> Hi all, I'm posting this in the hope that someone who understands
> rails dependencies can shed some light.
> I've implemented a "ModelSecurity" module in the vein of Bruce Peren's
> old ModelSecurity plugin (http://rubyforge.org/projects/model-
> security/ ).
> My ModelSecurity module lives in $RAILS_ROOT/lib. It is automatically
> included into ActiveRecord::Base by a file in config/initializers. BTW
> this is on rails 2.1 stable.
Add that file to Dependencies.load_once_paths ?
Basically the problem is that it's trying to remove that module, but
ActiveRecord::Base still references it. So your module has to live
outside of the reloading paths. Either in a plugin or some other path
you manually add to load_once_paths (as frederick mentioned).
If you want to reload this module you can simulate it with just:
It's not strictly the same, but it will have the desired result for you.