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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dd61f82d816b77539a9999f577550daf?d=identicon&s=25 Tony Shawn (Guest)
on 2006-04-05 23: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
   end
end

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

-T
D707194949c58eb4076f040adf116508?d=identicon&s=25 Bruno Celeste (Guest)
on 2006-04-06 00: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.