Why callbacks for the after_find and after_initialize events is to define them as methods?
Posted
by piemesons
on Stack Overflow
See other posts from Stack Overflow
or by piemesons
Published on 2010-05-11T06:31:22Z
Indexed on
2010/05/11
6:34 UTC
Read the original article
Hit count: 156
callback
|ruby-on-rails
The only way to define callbacks for the after_find and after_initialize events is to define them as methods. If you try declaring them as handlers using the second technique, they’ll be silently ignored.
Can anybody explain why is it so?
Why specifically for these two callbacks?
© Stack Overflow or respective owner