Always execute code
I have a couple of tasks that I have to execute every time any request takes place. (Checking if an user is logged in, checking if there are any new messages, etc)
I tried putting the relevant code into application_controller.rb and using a before_filter, but the variables wouldn't be accessible in the view.
I ended up putting that code into every single controller action, but there has to be a nicer way, no?