Global variables in Rails
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.
Don't miss what's next. Subscribe to Dr. Matt Lee's Close Personal Friends: