I'm using Rail 1.1.6 on FreeBSD with ruby 1.8.5. I've setup
environment.rb as suggested in the README and added the load line to
the top of my ApplicationController definition. When I hit the action
for which I defined an "after" it works the first time through.
However, when I refresh the page in my browser the mole_logs table
isn't added to and the following ends up in the log:
>>> Mole Error: After-Filter -- uninitialized constant MoleFeature
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/
active_support/dependencies.
rb:123:in `const_missing'
/usr/home/maui/dve/ideeli_trunk/config/../vendor/plugins/mole/lib/mole/
db_mole.rb:23:i
n `mole_it'
/usr/home/maui/dve/ideeli_trunk/config/../config/mole.conf:19
I'm thinking perhaps I put the load line in the wrong place. Should
it be inside the ApplicationController definition?
Thanks,
Mark
class ApplicationController < ActionController::Base
include CachingHelper
include ControllerUtil
before_filter :setup_current_user,:authenticate
load MOLE.path if File.exists?(MOLE.path) and MOLEABLE_APP
end
works great on first request and fails on a refresh. I added require
'mole'
To the db_mole and this had no effect.
Any progess? Thoughts?
Thanks,
Dave
On May 10, 8:58 pm, "Fernand Galiana" <fernand.gali...@gmail.com>
wrote:
add this to init.rb uner the mole plugin dir.
$: << File.join(File.dirname(__FILE__), 'lib','models')
I think rails is unloading all the models int dev mode. And then it
can't find the mole models. My guess is that this is something that
engines does for you.
Dave