Rails : require custom modules from lib

19 Apr 2013

Rails won't require all our custom classes and modules from the lib folder by default. But manually requiring each files won't look neat. Here is how you can ask Rails to require those files.
In you application.rb, find the line given below

now uncomment and change the path to lib.
This makes rails to require your custom classes and modules from lib or some other custom folder.

Hope it helped you.
Happy coding.
If you find my work helpful, You can buy me a coffee.