Reputation: 14504
Rails in which folder should ruby classes go into?
I am reading this guide and I am wondering in which folder the NewsletterJob class should be in.
Upvotes: 1
Views: 650
Reputation: 26979
If you use the lib folder in rails 3, you need to add that to the load path, as rails 3 removed it by default:
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib)
Upvotes: 4
Reputation: 10412
You can put them in the lib folder. Or maybe add a folder under app, like jobs and you should get it loaded automatically in your environment.
Upvotes: 3