Where should I put shared code in a rails project? The shared code is neither controller nor view nor model. But putting it in /lib would require server restart to reflect changes. Any suggestions?
on 2007-05-07 14:32
on 2007-05-07 18:05
Arrix wrote: > Where should I put shared code in a rails project? Where would the code be used? If you want methods to be available in all your controllers, you can put them in app/controllers/application.rb. If you want to add methods that will be available to all your views, you can put them in app/helpers/application_helper.rb. If you want code to be available everywhere in your project (controllers, views, tests, migrations, etc.), you'll probably want to create a module in lib.