I have a before_filter in ApplicationController in which I want to check
if the current location is the same as a certain route, so that I only
redirect non-logged in visitors to the “join” page if they’re not on
that page already.
The code I came up with is a bit ugly:
redirect_to join_url unless (@logged_in or action_name == “join”)
I’m pretty sure there is some nice way of doing this, along the lines of
… current_url == join_url
but I can’t seem to find it on Google, nor does #rubyonrails know.
Another way to solve this would be :exclude on the filter, but can you
exclude a specific action in a specific controller, for an