Forum: Ruby on Rails Dependencies::LoadingModule for custom paths

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3b7eca1e9f573fa5a40b2286d4d36f8d?d=identicon&s=25 slyphon (Guest)
on 2005-12-08 19:51
(Received via mailing list)
I've been trying for several months now to try and figure out how
Dependencies::LoadingModule works and I can't seem to get the hang of
it. I have the following line in my config/environment.rb

Object.const_set "Lib", Dependencies::LoadingModule.root(File.join
(RAILS_ROOT, 'lib'))

this works for setting up a 'Lib' module that can find appropriately-
named modules (following the rails convention of path/class name
correlation) so with a module lib/xmlrpc.rb, using Lib::Xmlrpc.new
finds the correct class.

However! I can't seem to get that class to dynamically reload with
each request, as the controllers and views do.

I've tried reading through the source of LoadingModule, but it's ill-
documented (granted, it is #:nodoc:-ed) and well, it's a bit *involved*.

Any Suggestions?

Jonathan Simms
This topic is locked and can not be replied to.