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:
can someone give me any ideas on where in the chain the validation takes
On Thu, Apr 28, 2011 at 3:06 PM, Sergio R. [email protected]
This is really a Rails or ActiveRecord question rather than RSpec.
In any case.
will run the custom_validation method whether the model is being
created or updated.
will only run the custom_validation method when the method is being
There’s also a validate_on_update method which will run the custom
validation method when the model is being updated but not when it is
thanks, nick… i looks like i need to hunt around a bit more as to what
was causing my problem…
On Thu, Apr 28, 2011 at 2:06 PM, Sergio R. [email protected]
Posted via http://www.ruby-forum.com/.
rspec-users mailing list
validate will run that validation on create and update.
validate_on_create will only run on creation.