I have defined the following method in both application.rb and
This method is called in a before_filter in my application.rb, as well
as in my layout/application.rhtml and view/user/login.rhtml (for
showing a login / logout button, etc.)
I had to put it both places, otherwise I would get an ‘undefined method’
Is there a better approach I should take to DRY this duplicate logic up?
Any suggestions appreciated!