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
The :except
option takes action names, not url parts. Here's what you should do instead:
class ApplicationController < ActionController::Base
before_filter :update_activity_time
...
end
Then, in sessions_controller.rb
:
class SessionsController < ApplicationController
skip_before_filter :update_activity_time, :only => [:new, :destroy]
...
end
You don't want to put the :except
in ApplicationController
because, if you did, the new
and destroy
actions for every one of your app's controllers wouldn't update the activity time.