On Thu, Apr 28, 2011 at 2:06 PM, Sergio Ruiz <[email protected]> wrote:
> i just ran into a problem with some test, and i am not exactly sure why, > but the difference happened when i changed my model validation from: > > validate :custom_validation > > to: > > validate_on_create :custom_validation > > can someone give me any ideas on where in the chain the validation takes > place? > > thanks! > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rspec-users > `validate` will run that validation on create *and* update. `validate_on_create` will only run on creation.
_______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
