According to "Custom Rake Tasks":
desc "Pick a random user as the winner"
task :winner => :environment do
puts "Winner: #{pick(User).name}"
end
As far as I know, the :winner => :environment
means "do environment
before winner
". But what's environment
? When should I use it?
I tried rake -T
, but in the list I couldn't find environment
.