search for: before_remove_const

Displaying 1 result from an estimated 1 matches for "before_remove_const".

2010 Sep 08
1
Unintended side-effect from before_remove_const?
Hey all, In troubleshooting a failing test for MetaSearch against 3-0-stable, I came across some undesirable (from my side, anyway) behavior in http://github.com/rails/rails/commit/bf87528b53f1422708ec0188d126cfca824ddc5c. A simple one-liner, it would appear, but AR::Base implements before_remove_const to do a bit of scoped method cleanup... It''s the only thing I can see that might cause the problem, which is: When accessing an AR::Base subclass via a reflection''s klass accessor, it seems as though class_attributes which are set up via macros (attr_unsearchable in the MetaSearc...