In a controller in my Rails app, I can do this:
before_filter :login_required, :except => :index
But I would like to apply the filter not only based on the action name but on the format of the request. In other words, I would like to do something like this:
before_filter :login_required, :except => {:action => :index, :format => :js}
Is this possible?