Hi, when I try to migrate this:
class AddPrice < ActiveRecord::Migration
def self.up
add_column :products, :price, :decimal, :precision => 8, :scale =>
2, :default => 0
end
def self.down
remove_column :products, :price
end
end
I get this error:
>rake db:migrate
in C:/rails/depot
== AddPrice: migrating ===============================-- add_column(:products,
:price, :decimal, {:default=>0, :precision=>8,
:scale=>2})
rake aborted!
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]
The one thing I''ve noticed that is kind of strange is that
:default=>0
has moved from beeing after precision and scale to be before it.
I''ve installed edge (I think at least, is there a way so check that?)
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---