Reputation: 267060
What are the reasons putting a module in /helpers over the /lib folder in a RoR app?
Are /helpers more controller specific, while the /lib is more general in nature?
Upvotes: 10
Views: 1487
Reputation: 51707
Helpers are strictly for defining methods that you want available in your views. /lib modules can be used for anything and are available throughout the application.
Upvotes: 12
Reputation: 42863
I think this is a good question because the MVC notion makes us forget that it's all really just metaphors for us to organize code so we don't get too mixed up. If you need to do some simple formating go with a helper, otherwise probably a module in /lib.
Upvotes: 12