[LRUG] A feature of Rails callbacks i wasn't aware of - anyone else?
Glenn @ Ruby Pond Ltd
glenn at rubypond.com
Sun Jun 14 23:21:22 PDT 2009
I'm fairly certain this is a throwback to the *old* way filters used
to work, and is mostly there for legacy reasons. The generally
accepted approach is to make it redirect rather than return.
And to avoid @model.save returning false and breaking the chain I
always use @model.save! and rescue_from
Here's a thread I quickly found discussing the change:
http://www.ruby-forum.com/topic/128746
Glenn
--
Ruby Pond Ltd
7 Clarence Pde, Cheltenham, GL5 03NY
United Kingdom
T: 0207 183 2224
F: 0207 183 2223
W: http://rubypond.com/
More information about the Chat
mailing list