In my layout folder under views I have saved a common rhml file which is used by all by views. How can I call an action from a controller? Probably that isn''t the right way. Is there a way to save common ruby code somewhere? And how can I call for it? Yes, I''m pretty new to ruby 8) -- 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 -~----------~----~----~----~------~----~------~--~---
Fredrik [:all] wrote:> In my layout folder under views I have saved a common rhml file which is > used by all by views. > How can I call an action from a controller? Probably that isn''t the > right way. > Is there a way to save common ruby code somewhere? And how can I call > for it? > > Yes, I''m pretty new to ruby 8)I''d start with application_helper.rb Methods defined here are callable from inside any view. A. -- 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 -~----------~----~----~----~------~----~------~--~---