Example usage:
old_accounts = Account.where("created_at < ?", 1.month.ago)
old_abandoned_trials = AbandonedTrialQuery.new(old_accounts)
old_abandoned_trials.find_each do |account|
account.send_offer_for_supportUpdate 8/16/2015: I updated this guide a bit and posted it to Medium
A few notes about things I do when I travel to Japan.
| h = { | |
| 'a' => :a_value, | |
| 'b' => nil, | |
| 'c' => false | |
| } | |
| h.fetch('a', :default_value) #=> :a_value | |
| h.fetch('b', :default_value) #=> nil | |
| h.fetch('c', :default_value) #=> false | |
| h.fetch('d', :default_value) #=> :default_value |