rails/rails — pull request #13910 by huoxito (2014-02-01 01:15:56+00:00)
Title: Return hash with_indifferent_access on Session::JsonSerializer

We need to be able to access data, flash messages example, as both
flash[:success] and flash["success"].

Hey guys I've been trying to write a regression test for this to prove my point but couldn't so far. I'm doing something like this in dispatch/cookies_test.rb

```ruby
def test_flash_message_using_json_serializer
@request.env["action_dispatch.session_serializer"] = :json
get :set_flash_message
assert_equal 'beer!', flash[:success]
assert_equal 'beer!', flash["success"]
end
```
I've been running spree build on rails edge and realized a bunch of tests failing were related to missing flash message content on the view. It took me a while to see that rails generate a session_store with `serializer: :json` and successfully reproduce that on a spree app itself.

This is related to https://github.com/rails/rails/commit/b23ffd0 and https://github.com/rails/rails/commit/fd48786. Let me know if doesn't make any sense. I can't access `flash[:success]` on views unless I add that call in JsonSerializer.

// @lukesarnacki @guilleiguaran was this working properly for you guys?