rm ActiveRecord::Type::Decorator

It only existed to make sure the subclasses of `Delegator` were YAML
serializable. As of Ruby 2.2, these are YAML dumpable by default, as it
includes
2a4d9568f7
This commit is contained in:
Sean Griffin 2015-02-07 14:10:58 -07:00
parent 631707a572
commit 7e93e33c19
4 changed files with 0 additions and 28 deletions

@ -2,8 +2,6 @@ module ActiveRecord
module AttributeMethods
module TimeZoneConversion
class TimeZoneConverter < DelegateClass(Type::Value) # :nodoc:
include Type::Decorator
def type_cast_from_database(value)
convert_time_to_time_zone(super)
end

@ -1,5 +1,4 @@
require 'active_record/type/helpers'
require 'active_record/type/decorator'
require 'active_record/type/mutable'
require 'active_record/type/numeric'
require 'active_record/type/time_value'

@ -1,14 +0,0 @@
module ActiveRecord
module Type
module Decorator # :nodoc:
def init_with(coder)
@subtype = coder['subtype']
__setobj__(@subtype)
end
def encode_with(coder)
coder['subtype'] = __getobj__
end
end
end
end

@ -2,7 +2,6 @@ module ActiveRecord
module Type
class Serialized < DelegateClass(Type::Value) # :nodoc:
include Mutable
include Decorator
attr_reader :subtype, :coder
@ -36,16 +35,6 @@ def accessor
ActiveRecord::Store::IndifferentHashAccessor
end
def init_with(coder)
@coder = coder['coder']
super
end
def encode_with(coder)
coder['coder'] = @coder
super
end
private
def default_value?(value)