pelargir / auto-session-timeout

Provides automatic session timeout in a Rails application.
MIT License
126 stars 63 forks source link

Added before_session_reset support #41

Closed Nuzair46 closed 1 year ago

Nuzair46 commented 1 year ago

Added before_session_reset.

User can provide a concern named before_session_reset to do some custom operation before the session is reset by the gem.

pelargir commented 1 year ago

I appreciate the PR, but couldn't you accomplish this by overriding the #handle_session_reset method in your controller and calling super? Something like this:

def handle_session_reset
  # insert before session reset code here
  super
end
Nuzair46 commented 1 year ago

Makes sense. Closing the PR.