Ingmar: Thankyou for your reply, I still haven't managed to resolve the 
issue

My init.rb file contains the following:
require 'activeext.rb'
require 'activeext_model.rb'
require 'activeext_controller.rb'
require 'activeext_view.rb'

Dependencies.explicitly_unloadable_constants = 'ActiveExt'
Dependencies.load_once_paths.delete(File.expand_path(File.dirname(__FILE__))+'/lib'

For some reason scoping Dependencies in the ActiveSupport module doesn't 
work.  Also after I add the explicitly_unloadable_constants, the module 
is no longer available in the controller. (I suppose this could be 
because the plugin has the same name as the module?



Ingmar wrote:
> I ran into the same problem; turned out that I also had to add the
> module which contains my plugin's classes to
> ActiveSupport::Dependencies.explicitly_unloadable_constants
> 
> So if you have your plugin structured like this
> 
> init.rb
> lib/myplugin.rb
> lib/myplugin/*.rb
> 
> you should add the following line to your init.rb
> 
> ActiveSupport::Dependencies.explicitly_unloadable_constants =
> 'Myplugin'
> 
> and then declare a module (or a class) called Myplugin in lib/
> myplugin.rb (otherwise Rails would give me errors about expecting this
> file to declare a class with that name)
> 
> On Jul 24, 2:36�am, Alex Moore <[EMAIL PROTECTED]>

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to