[rspec-users] #add method?
Tom Stuart
tom at experthuman.com
Sun Sep 16 03:59:24 EDT 2007
On 16 Sep 2007, at 06:12, David James wrote:
> I've seen reference to an 'add' method, as in Model.add. When and
> why would I want to use it? Is it related to Model.collection.build?
Perhaps you're thinking of http://api.rubyonrails.org/classes/
ActiveRecord/Errors.html#M000960. You can use it to explicitly add a
validation error to an attribute of an ActiveRecord instance.
Cheers,
-Tom
More information about the rspec-users
mailing list