I need to pull user preferences on every page load of every controller
and action in my app. I do this like so:
@user = User.find(@session[‘user’].id)
@prefs = @user.prefs
And it works fine in the action of one of my controllers, but I
certainly don’t want to plunk it in every instance. Where do you
normally put something like this? I tried putting it in the application
controller (application.rb), but it gives me the nil object error.