NoamB/sorcery — pull request #531 by k-rudy (2014-04-18 10:58:58+00:00)
Title: [Fixes #530]: Flash messages disappear after unsuccessful login attempt

Hi guys,

This PR fixes issue #530.

After you reset the session using `reset_session` method you restore the session elements into a new session hash with symbolized keys. The issue here is that after the session was reseted it becomes a plain `Hash` object and not `Rack::Session::Abstract::SessionHash` as it was before reseting it. Therefore it no longer supports `indifferent_access` facilities.

At the same time Rails accesses flash by `String` key - https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/flash.rb#L9

Let me know if you have any comments / issues.

Best,
Konstantin.