Global variables in Rails (2007) (2007)
in app/controllers/application.rb
add:-
before_filter :foo
and then:-
def foo
@blah = Monkey.find(:first)
end
This had been bugging me for ages and it turns out that tgb had the answer. Spunky.
Published: Fri Mar 30 2007 08:28:29 GMT-0400 (Eastern Daylight Time) by Dr. Matt Lee