At the current moment, not that I know of, as this is a Rack bug and Rack
does not expose an explicit function to force the session to be loaded.

On Friday, October 4, 2013, Kelvin Raffael Stinghen wrote:

> In lib/devise/controllers/helpers.rb:
>
> > @@ -258,6 +258,10 @@ def sign_in_and_redirect(resource_or_scope, *args)
> >        end
> >
> >        def expire_session_data_after_sign_in!
> > +        # session.keys will return an empty array if the session is not yet loaded.
> > +        # This is a bug in both Rack and Rails.
> > +        # A call to #empty? forces the session to be loaded.
> > +        session.empty?
>
> I know this is already merged... But, doesn't exist a more elegant
> solution to this issue?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/plataformatec/devise/pull/2663/files#r6756468>
> .
>


-- 


*
José Valim
www.plataformatec.com.br
Founder and Lead Developer
*