Just put it in a helper and include that helper in ApplicationController like this
include MyHelperWithGlobalStuffInIt On Sat, Feb 27, 2010 at 3:08 PM, Dudebot <[email protected]> wrote: > I need to have the exact same method available in all controllers and > in all views. Right now, I have it repeated in app/controllers/ > application_controller.rb and app/helpers/application_helper.rb. In > DRY tradition, what's the best way to only have it in one place? > TIA, > Craig > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

