Created
September 12, 2012 13:12
-
-
Save rodrei/3706509 to your computer and use it in GitHub Desktop.
Migration
This file contains hidden or 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
Call.where(:state.in => [:to_bill, :free]).all.each do |c| | |
c.billing_state = c.state | |
c.state = :scheduled | |
c.save! | |
end | |
Call.where(:billing_state => nil).each do |c| | |
c.update_attributes!(:billing_state => "unprocessed") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment