Closed allaire closed 4 years ago
The frequency
is always added to the value, making the expires_at always bigger
@pelargir found the issue, it was caused by a get parameter (locale
) which prevented the unless start_with?
to trigger.
I have overwrite the route in my controller to remove the param:
# Bypass c.request.original_url.start_with?(c.send(:active_url)) because of locale
def active_url(options = {})
options[:locale] = nil
super(options)
end
Maybe we should ignore get parameters right in the unless statement?
This could be a regression due to a newer version of Rails. I originally wrote the gem to work with Rails 3. Which version are you using?
@allaire I'm pretty sure #26 fixed this. Make sure you're scoping the auto timeout routes with the locale in routes.rb to ensure they include the locale when they get used in the JS helper:
scope '(:locale)' do
get 'active' => 'users#active'
get 'timeout' => 'users#timeout'
end
If this is still happening for you, please reopen this issue.
Hi,
If I don't set
auto_session_timeout
to the same frequency of the JS ping to/active
, thesession[:auto_session_expires_at]
just keep going up and is never reached, even if no action is happening.Any idea?