On 6 August 2012 14:30, masta Blasta <[email protected]> wrote: > Andrew Vit wrote in post #1071395: >> Yes, exactly. before_validation happens before every validation. That >> means: >> >> model.valid? >> model.save >> model.create >> >> before_validation_on_create only happens when saving a new record. > > How do these before validation callbacks work? Are they just simple > function callbacks, or can you return false or errors.add in them to > halt the rest of the record.save code?
Have a look at the Rails Guide on ActiveRecord Validations and Callbacks. That may answer your questions. Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

