pelargir / auto-session-timeout

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

auto_session_timeout_js is not defined #9

Closed lgrains closed 5 years ago

lgrains commented 7 years ago

I get the error auto_session_timeout_js is not defined after I added this into my layout:

<% if (current_account) %>
   <%= auto_session_timeout_js %>
<% end %>

I'm using Rails 4.2.0 I think I have everything else set up correctly - do you have any suggestions?

One more edit, I installed jquery-auto-session-timeout but putting it in my Gemfile and running bundle install. However, I still get the same error.

Thanks!

pelargir commented 7 years ago

Seems like the helper providing the #auto_session_timeout_js method isn't getting loaded properly. This gem has only been tested against Rails 3. I have no idea if it works with Rails 4 or not.

davegudge commented 5 years ago

I don't think this is an issue anymore. I followed the readme and successfully installed using a Rails5 setup.

webaholik commented 5 years ago

Verified working in 4.2.0 as of today! The javascript needed minor modification for the redirect to work in my environment. PR created: https://github.com/pelargir/auto-session-timeout/pull/25

pelargir commented 5 years ago

@lgrains please re-open this issue if you're still getting the undefined method error.