views:

59

answers:

1

Hi,

I have a ruby on rails project with scaffolding , views, layouts, models and such. I also have some standalone ruby (.rb) files which i would like to include in my afforementioned project. Is it possible to simply call these methods defined in these rb files by placing them somewhere and calling them from the controller or so?

If not, how can i go about and add them?

Any assistance would be highly appreciated thanks

+4  A: 

Place your code in the lib folder, then create a new initializer file in config/initializers and require the files u want.

khelll
Thanks i'll give this a shot
Erika
thanks this edit worked great!
Erika