Class: PaperTrail::AttributeSerializers::LegacyActiveRecordShim::NoOpAttribute

Inherits:
Object
  • Object
show all
Defined in:
lib/paper_trail/attribute_serializers/legacy_active_record_shim.rb

Overview

An attribute which needs no processing. It is part of our backport (shim) of rails 4.2’s attribute API. See ‘type_for_attribute` below.

Instance Method Summary collapse

Instance Method Details

#type_cast_for_database(value) ⇒ Object



9
10
11
# File 'lib/paper_trail/attribute_serializers/legacy_active_record_shim.rb', line 9

def type_cast_for_database(value)
  value
end

#type_cast_from_database(data) ⇒ Object



13
14
15
# File 'lib/paper_trail/attribute_serializers/legacy_active_record_shim.rb', line 13

def type_cast_from_database(data)
  data
end