I checked the API docs and found nothing about add_to_base gotchas..
but when adding an error to the base of an ActiveRecord object, it
essentially does nothing. The save/valid? methods work as if there
were no errors, and of course the view does not display them. Code
basically goes like this:
@order = account.orders.build
@order.errors.add_to_base("Must select at least one item")
if @order.save
...
also tried @order.valid? instead of save
Both return true and the record is saved anyway. Any ideas?
I am running Rails 1.2.6 as a gem.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---