[Rails] before_save gotcha

Marcel Molina Jr.
Fri, 10 Feb 2006 20:50:11 -0000

On Fri, Feb 10, 2006 at 12:46:18PM -0800, Pawel Szymczykowski
wrote:
> Is it will known and accepted that before_save triggers should return
> true? I didn''t notice this before but now I see it in the
> documentation.

It is not that they should return true, it is that they should *not* return
false.

Returning nil or any boolean true value is fine, but the request chain will
be halted if a before_filter returns false.

marcel
--
Marcel Molina Jr. <marcel@vernix.org>