Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flash_timedout = “true” when user session expires in rails using devise #2787

Closed
meridiansoft opened this issue Dec 13, 2013 · 3 comments

Comments

@meridiansoft
Copy link

Hi,
i am using devise for mu user stuff. for the session expiry, i did the following 2 steps:

In sessions_controller:

prepend_before_filter { request.env["devise.skip_timeout"] = true }

In user model:

devise :timeoutable, :timeout_in => 2.minutes

If my session expires, i am getting an error "Your session has expired..." from devise errors which is fine.

But i am getting extra error outside the form as "true" where i inspect it as [:flash_timedout].

Please help me how to disable this true [:flash_timedout] ?

Thanks in advance..

@josevalim
Copy link
Contributor

Please just show values in your views that are strings. If you print everything, true will indeed show up.

@dopa
Copy link

dopa commented Apr 2, 2014

This exact thing is happening to me when sessions time out.

Can you PLEEEEASE give a little more info to go on @josevalim or point me to a page that explains how to do what you suggest? I use simple_form and just have <%= f.error_notification %> at the top of many forms, which usually works fine.

screenshot 2014-04-02 11 58 18

@josevalim
Copy link
Contributor

f.error_notification is not supposed to show all messages in your flash. There is something going and printing all values in your flash message and that method should actually filter and guarantee if the value is an actual string before hand.

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

No branches or pull requests

2 participants