Provides a subclass of Hash and a wrapper around Rails' serialize attribute for object-like access to hashes without validating existence of nested hashes
h = Metadata.new
h # => {}
h.outer.inner # => {}
h = Metadata.new( { outer: { inner: { hash_key: "value" } } } )
h.outer.inner.hash_key # => "value"
h = Metadata.new( {} )
gem "metahash", github: "TinderBox/MetaHash"
metadata_field_for :field_name
This gem has been tested with Ruby 2.0, and rails 3.2
- Fork the project
- Create a new, descriptively named branch
- Add Test(s)!
- Commit your proposed changes
- Submit a pull request