views:

69

answers:

3

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.

+4  A: 

In the /lib folder is fine.

geofflane
A: 

It would help to know what your class is trying to accomplish, but in general /lib is a decent enough location.

jdl
+1  A: 

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...

Tony Heupel