lib/devise/failure_app.rb :80

22 views
Skip to first unread message

Andrey Voronkov

unread,
May 23, 2012, 4:07:44 AM5/23/12
to plataforma...@googlegroups.com
  def redirect_url
      if warden_message == :timeout
        flash[:timedout] = true # This string
        attempted_path || scope_path
      else
        scope_path
      end
    end

Is this flash[:timeout] correct? because on session expiration I have an extra flash message with "true" text and have to use hack in my haml template.

- flash.delete :timedout # Dirty Devise workaround on session expire.

If this is a bug I can provide pull request in a minute. 

Carlos Antonio da Silva

unread,
May 23, 2012, 8:13:27 AM5/23/12
to plataforma...@googlegroups.com
Technically yes, flash doesn't necessarily need to be used for string messages only, but you can show only strings using helpers in your view. Without this it wouldn't be possible to carry on the timeout message iirc.

-- 
At.
Carlos Antonio

Reply all
Reply to author
Forward
0 new messages