Dry de/serialize nested Hashes/Arrays of ActiveRecords
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
Gemfile
Gemfile.lock
Rakefile
Readme.md
VERSION
ar_serialize.gemspec

Readme.md

Dry de/serialize nested Hashes/Arrays of ActiveRecords

Strips unnecessary info like attributes/associations from infinetly deep Hashes/Arrays.

Install

sudo gem install ar_serialize

Or

rails plugin install git://github.com/grosser/ar_serialize.git

Usage

{:foo => <User>}.to_yaml --> tons of stuff including asociations and attriutes
ArSerialize.seriazlize(:foo => <User>) --> {:foo => "ActiveRecord:User:15"}
ArSerialize.deseriazlize(:foo => 'ActiveRecord:User:15') --> {:foo => <User>}

Author

Michael Grosser
michael@grosser.it
Hereby placed under public domain, do what you want, just do not hold me accountable...