This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note - you may need to split into a before-deploy (stop) and after-deploy (start) depending on your setup | |
desc "Hot-reload God configuration for the Resque worker" | |
deploy.task :reload_god_config do | |
sudo "god stop resque" | |
sudo "god load #{File.join deploy_to, 'current', 'config', 'resque.god'}" | |
sudo "god start resque" | |
end | |
after 'deploy:update_code', 'deploy:update_shared_symlinks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DatabaseCleaner.strategy = :truncation, { :except => %w[ translations ] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Photo < ActiveRecord::Base | |
has_attached_file :image, :styles => { :thumb => ['150x150#', :png], | |
:normal => ['660x660', :png] }, | |
:default_style => :normal | |
typed_serialize :sizes, Hash | |
before_save :cache_image_sizes | |
# Get size of this photo for specified style | |
# |