Jonathan Rochkind wrote:> So, all the documentation says I should be able to call #create! on an
> ActiveRecord, to do the same thing as #create, but raise an exception on
> validation failure.
>
> But when I try this on any ActiveRecord::Base class, I seem to get an
> exception raised with method_missing, saying there''s no create!
method.
>
> Am I missing something?
Hey,
I have always used #save instead of #save!, and still can catch those
validation errors!
--
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
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?hl=en
-~----------~----~----~----~------~----~------~--~---