balderdashy/sails — pull request #1371 by kmcgrath (2014-02-04 04:20:01+00:00)
Title: move defaults to instantiation and send all but save method to Session.s...

Session data with sockets is not being saved properly.

`data` is being set on instantiation but never updated with current session data. The `save` function uses `data` as defaults for `this` but then sends a unmodified `data` object on to `Session.get`.

This PR sets defaults upon instantiation then sends the updated `this` object (minus `save`) to `Session.get`

Tested with Memory and Mongo adapters.