Hi, guys.  I changed some columns types to decimal in database, but the
code is not DIY.  Any thoughts on refactoring the following code?

change_table :accounts do |t|
t.change :check_amount, :decimal, :precision=>6, :scale=>2, :default=>0
t.change :cash_amount, :decimal, :precision=>6, :scale=>2, :default=>0
t.change :change_amount, :decimal, :precision=>6, :scale=>2, :default=>0
.
.
.
.
t.change :total, :decimal, :precision=>6, :scale=>2, :default=>0
end


Thanks in advance.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to