Use ActiveSupport autoloading outside of Rails

Posted . Visible to the public.

The following code activates autoloading using ActiveSupport 3.x:

require 'active_support'
require 'active_support/dependencies'
relative_load_paths = %w[app/controllers app/models]
ActiveSupport::Dependencies.autoload_paths += relative_load_paths
Tobias Kraze
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Tobias Kraze to makandra dev (2012-06-05 13:02)