Reputation: 35
Where is the best location to put a plain old Ruby class in a Rails application? I'm not sure if it should go in the helper, model, or controller folder or should I create another folder to handle Ruby classes.
Upvotes: 0
Views: 550
Reputation: 1053
The question really is, what purpose does it serve? Is it data-like stuff? model for that. Is it a helper class that adds functionality to other classes or is a utility? Probably lib. Etc...
Upvotes: 1
Reputation: 17790
It would help to know what your class is trying to accomplish, but in general /lib is a decent enough location.
Upvotes: 0