1 2 3 4 5 6 7 8 9 10 11 12 13 |
# Invoke the command with the following (again at the command line in the root of your app: “rake defaults:set_targets” # Don't forget to set account_id to 1 and admin? to true (1) in db namespace :defaults do desc "set minimum targets for advisors with empty targets" task :set_targets => :environment do User do |advisor| advisor do |year| year(:target, 88500) if year year(:minimum_target, 33500) if year end end end end |
Pastie
