Re: [Rails] MyModel.descendants returns [] in a view after the first call?

2011-05-04 Thread Max Schubert
I am guessing you are in development mode with class caching off :) and that this behavior does not occur in test nor production mode ... Try the code with either test or production if you haven't already ... I had gone to the place you are in as well, initially my workaround was for my class to r

[Rails] MyModel.descendants returns [] in a view after the first call?

2011-05-04 Thread Fearless Fool
[I posted this initially to the StackOverflow list. There have been no nibbles, so I'm coming here to consult the real experts! :)] I want to display a selection list of MyModel subclasses in a view. It's not working yet, so for sanity checking, I included this in my view: <%= MyModel.descendant