On 3.1.2006, at 9.56, Chris Nolan.ca wrote:
> What''s the better thing to do in a before_save if you
don''t want
> the save to continue?
Return false.
"If a before_* callback returns false, all the later callbacks and
the associated action are cancelled. If an after_* callback returns
false, all the later callbacks are cancelled. Callbacks are generally
run in the order they are defined, with the exception of callbacks
defined as methods on the model, which are called last." [1]
//jarkko
[1] http://api.rubyonrails.com/classes/ActiveRecord/Callbacks.html
>
> Thanks,
> Chris Nolan.ca
> http://kweschun.com/ - Do you have a Kweschun?
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
Url :
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060103/55015110/smime.bin