Serialized Attributes created virtual attributes backed by a serialized hash. It works best together with github.com/jqr/typed_serialize
class User < ActiveRecord::Base typed_serialize :meta, Hash serialized_attributes :meta, :name, :surname, :phone end u = User.new u.meta # => {} u.name = 'Federico' u.meta # => { 'name' => 'federico' } u.name # => 'federico'
- Homepage
- License
-
Copyright © 2011 Coderloop Inc. <[email protected]>, released under the MIT license