Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Pass the session to the controller's `last_request_update_allowed?` method #377

wants to merge 1 commit into


None yet
2 participants

This patch passes the calling-session through to your controller's last_request_update_allowed? method to enable a developer to not update last_request_at for a given session, if there are multiple existing sessions.

I use it like this:

class ApplicationController
  def last_request_update_allowed?(session)
    sesson.id != UserSession::SECURE

(The slightly odd choice of base for this branch is because I need this to work on my Rails 3.0 app too.)


binarylogic commented Feb 28, 2014

This is cool, I'm not sure it needs to be part of the main gem. Let me think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment