Class: PaperTrail::AttributeSerializers::ObjectAttribute
- Inherits:
-
Object
- Object
- PaperTrail::AttributeSerializers::ObjectAttribute
- Defined in:
- lib/paper_trail/attribute_serializers/object_attribute.rb
Overview
Serialize or deserialize the ‘version.object` column.
Instance Method Summary collapse
- #deserialize(attributes) ⇒ Object
-
#initialize(model_class) ⇒ ObjectAttribute
constructor
A new instance of ObjectAttribute.
- #serialize(attributes) ⇒ Object
Constructor Details
#initialize(model_class) ⇒ ObjectAttribute
Returns a new instance of ObjectAttribute.
9 10 11 |
# File 'lib/paper_trail/attribute_serializers/object_attribute.rb', line 9 def initialize(model_class) @model_class = model_class end |
Instance Method Details
#deserialize(attributes) ⇒ Object
17 18 19 |
# File 'lib/paper_trail/attribute_serializers/object_attribute.rb', line 17 def deserialize(attributes) alter(attributes, :deserialize) end |
#serialize(attributes) ⇒ Object
13 14 15 |
# File 'lib/paper_trail/attribute_serializers/object_attribute.rb', line 13 def serialize(attributes) alter(attributes, :serialize) end |