Module: ActiveRecord::Type::Decorator

Included in:
AttributeMethods::TimeZoneConversion::TimeZoneConverter, Serialized
Defined in:
lib/active_record/type/decorator.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#encode_with(coder) ⇒ Object



9
10
11
# File 'lib/active_record/type/decorator.rb', line 9

def encode_with(coder)
  coder['subtype'] = __getobj__
end

#init_with(coder) ⇒ Object



4
5
6
7
# File 'lib/active_record/type/decorator.rb', line 4

def init_with(coder)
  @subtype = coder['subtype']
  __setobj__(@subtype)
end