I have some behavior in my controller that I pulled out into a module in order to test better and re-use it in a few places. Two questions about this:
- Where is a good place to put my modules? They need to run in order to be available to the controllers, so I was thinking the
config/initializers/
directory. That seems a little suspect to me though.lib/
? - How do I ensure the code gets run so the modules are available to
include
in my controllers?
Thank you kindly sirs.