Forum: Ruby on Rails where do you put Classes in RoR

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Tony Shawn (Guest)
on 2006-04-06 01:08
I'm just trying RoR and it works very smoothly. I'am also somewhat
familiar with ruby however I do not know where my Classes are supposed
to go in RoR.

E.g. my ruby file looks like

include a_few_lib_here

Class function_name
   def aaaa

#main program
yadayada = function_name(parameter)

I understand:
- the main program goes in a controller I have to create
- but where am I suppose to put the Class stuff?

I'll re-use the Class stuff for different controllers but I'm not sure
where it is suppposed to go. Thanks.

Bruno C. (Guest)
on 2006-04-06 02:32
(Received via mailing list)
The "lib" directory is probably what you need; and don't forget to
require your lib in environment.
This topic is locked and can not be replied to.