I have a similar problem with certain calls in my init.rb only being picked up on the first request..
It appears to me like init.rb is only getting run once during start-up. This would explain why the mixins disappear after the first request - when the entire environment gets reloaded, anything that was added in init.rb will not get added the second time! Having said that, other plugins are still being loaded and mixed in correctly on subsequent requests... I have a feeling it's to do with the way engines enhanced plugins are loaded but I'm not entirely sure how.. Tekin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeroen van Doorn Sent: 27 February 2007 14:01 To: Discussion of the use of existing Engines Subject: Re: [Engine-users] lib folders and application controllers We're experiencing some problems which look like the earlier mentioned ones. Somehow the relations within our models are gone after one request. This isn't the case when we are in production mode, so it has something to do with loading. In the init.rb we are extending the ActionController::Base by using "ActionController::Base.class_eval do" if we use send on calls to ActiveRecord like permission.send(:find, :all) it only works on the first call. As soon as we reload the page, it breaks. Again in production mode it just works. We will be wading through the rails core and post back if we find something. Help is greatly appreciated. Kind regards, Jeroen van Doorn _______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.o rg _______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
