Module: MarshaledAttributes::ActiveRecord::ClassMethods

Defined in:
lib/marshaled_attributes/active_record.rb

Instance Method Summary collapse

Instance Method Details

#marshaled(*attrs) ⇒ Object

marshaled :title, :settings



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/marshaled_attributes/active_record.rb', line 13

def marshaled(*attrs)
  self.marshaled_attributes_options = {
    :attributes => attrs
  }

  include InstanceMethods

  after_initialize do
    add_marshaled_attributes
  end
end