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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---