Max Schubert wrote in post #996758: > Fearless, > Well, not really a bug - it is 'behavior as designed' but it is also a > 'fail' for those of us using 'meta-programming as designed LOL' > because meta-programming requires that classes be loaded and that the > callbacks associated with Object and Class get called!
Now I'm intrigued, but that doesn't explain to me why MyModel.descendants returns a valid list of descendants on the first call but an empty list thereafter. Can you explain why this happens (and why it's considered behavior as designed)? >> P.S.: I poked around and didn't see anything obvious > > I am using the Google group to respond, so no handle :). Were you > able to find the code I used to work around the class caching issue? I couldn't find your code. Without your patch, I can (a) restart the server frequently to avoid the MyModel.descendants bug that I observed, or (b) turn on class caching, which requires me to restart the server between changes. So your patch would be handy. (...I'm still astonished this is how it's designed to work!!) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

