Skip to content

Instantly share code, notes, and snippets.

@mgdelacroix
Created April 13, 2014 17:57
Show Gist options
  • Save mgdelacroix/10594819 to your computer and use it in GitHub Desktop.
Save mgdelacroix/10594819 to your computer and use it in GitHub Desktop.
Autoloading for rails 4 lib folder
# In config/application.rb
config.watchable_dirs['lib'] = [:rb]
# When requiring something, use require_dependency
# To use lib/myclass.rb
require_dependency 'myclass'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment