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
12 |
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
task :copy_resque_web_assets do | |
resque_assets = "`bundle show resque`/lib/resque/server/public/*" | |
resque_release_path = "public/admin/resque" | |
queue! %{ | |
echo "-----> Copying resque web assets" && ( | |
#{echo_cmd "mkdir -p ./#{resque_release_path}"} && | |
#{echo_cmd "cp #{resque_assets} ./#{resque_release_path}" } | |
) | |
} |
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
task :link_resque_web_assets do | |
assets_path = "vendor/bundle/ruby/1.9.1/gems/resque-*/lib/resque/server/public" | |
resque_release_path = "public/admin/resque" | |
queue! %{ | |
echo "-----> Linking resque-web assets" && ( | |
#{echo_cmd "mkdir -p ./#{resque_release_path}"} && | |
#{echo_cmd "ln -nfs ./#{assets_path}/* ./#{resque_release_path}"} | |
) |
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 Account < ActiveRecord::Base | |
def self.search(name = nil) | |
# search logic | |
end | |
end |
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
def fizzbuzz(n) | |
n%3<1&&f="Fizz";n%5<1?"#{f}Buzz":f||n.to_s | |
end |