If you are using trunk's latest, you shouldn't have this problem. Reloadable is no longer included into AR::Base and friends. Instead, only constants that are loaded via const_missing will be unloaded. Upgrading to trunk should solve your problem, but it's pretty fresh code. I'm not saying it's full of bugs, but it's not guarenteed to be as solid as you might expect.
On 8/9/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
Hello all,
I'm having a problem with some dynamic classes that I'm trying to use
in my development environment.
My app is creating some dynamic classes that descend from
ActiveRecord::Base. Now this part works fine, except that they only
exist for the life of one request in my development environment and
then they no longer exist. I'm calling a method from my
environment.rb to to do the initial class creation.
My current approach to recreating these classes is to use
const_missing if the classes aren't found, but I'm not having very
much success with this approach. I'm not sure this is even a safe
approach to solving my problem, so I was wondering if somebody (with
more in depth knowledge of how classes are reloaded) can give me a few
pointers on things I should be looking for, trying.
I can post some code if needed, but maybe there are some general
guidelines I should be following to begin with.
Thanks,
Andrew
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core