magiclabs/alchemy_cms — pull request #548 by wuservices (2014-05-21 02:30:57+00:00)
Title: Fixes clipboard for Rails 4.1

Not sure if this is the best approach but it seems to work and I needed this fixed. Feel free to modify if there's a better way.

Starting in Rails 4.1, Marshal is no longer used to serialize cookie values and the new format is JSON-based (http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer). Because the format is based on JSON, all Hashes get their keys stringified. This will automatically create a new clipboard for a broken session containing a string such as or a clipboard stored with an existing cookie.