datamapper/dm-rails — Issue #30: SessionStore does not write session if internals of session['flash'] are modified
Author: devrandom1
Created: 2011-12-07 22:40:40+00:00
State: open

`SessionStore::Session.set_session` gets the memorized session model instance from env, then updates session_data. However, session.dirty? is false even if the internals of the flash changed, because they were already modified by the flash object.

The fix seems to be to replace:

`session = get_session_resource(env, sid)`

with

`session = find_session(sid)`

to get a fresh copy.