title: :except not working in before_filter in application controller. Routing problem?
body: <p>I have a before_filter in my application controller to keep a user's session alive (and log them out if a time out has been reached). This should be called on every action except /sessions/new and /sessions/destroy which are routed as /login and /logout.</p>
  
  <p>The relevant parts of my application controller look like this;</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    before_filter :update_activity_time, :except =&gt; [:login, :logout]
  
    private
  
    def update_activity_time
      if current_user
        time_out = current_user.setting.remember_me ? 20160 : current_user.setting.user_timeout
        from_now = time_out.minutes.from_now
      end
      if session[:expires_at].blank?
        session[:expires_at] = from_now
      else
        time_left = (session[:expires_at].utc - Time.now.utc).to_i
        if time_left &lt;= 0
          session_expiry
        else
          session[:expires_at] = from_now
        end
      end
    end
  
    def session_expiry
      reset_session
      flash[:notice] = 'Your session has expired. Please log back in.'
      unless request.xhr?
        session[:return_to] = request.request_uri
        redirect_to login_url
      else
        session[:return_to] = request.referer
        render :js =&gt; "window.location.replace(\"#{login_url}\")"
      end
    end
  
  end
  </code></pre>
  
  <p>and my routes.rb contains the following;</p>
  
  <pre><code>map.login "login", :controller =&gt; "sessions", :action =&gt; "new"
  
  map.logout "logout", :controller =&gt; "sessions", :action =&gt; "destroy"
  </code></pre>
  
  <p>The before_filter is being called when /login or /logout are being visited. This isn't a show-stopper but it does cause a few odd behaviours (e.g. when logging out from a page that has timed out).</p>
  
  <p>Any ideas what I'm doing wrong? I'm using Rails 2.3.10.</p>