diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-28 07:48:07 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-28 07:48:07 -0700 |
commit | 748f070895dc0d76a02a45e1be5c50ea67a79e85 (patch) | |
tree | e763864e3d9d8038cf3c3fbabc9b83dd463c41f0 /activerecord/lib | |
parent | 7f73b9152cfc3f218cfc862e971ba56b94f6be10 (diff) | |
download | rails-748f070895dc0d76a02a45e1be5c50ea67a79e85.tar.gz rails-748f070895dc0d76a02a45e1be5c50ea67a79e85.tar.bz2 rails-748f070895dc0d76a02a45e1be5c50ea67a79e85.zip |
Remove unused `Column#coder`
It appears this property was added, but never actually used. It would be
broken if it were, as it only type casts one way.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/column.rb | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb index 86232f9d3f..a62617ab47 100644 --- a/activerecord/lib/active_record/connection_adapters/column.rb +++ b/activerecord/lib/active_record/connection_adapters/column.rb @@ -14,12 +14,9 @@ module ActiveRecord end attr_reader :name, :default, :cast_type, :null, :sql_type, :default_function - attr_accessor :coder - - alias :encoded? :coder delegate :type, :precision, :scale, :limit, :klass, :text?, :number?, :binary?, - :type_cast_for_write, :type_cast_for_database, to: :cast_type + :type_cast, :type_cast_for_write, :type_cast_for_database, to: :cast_type # Instantiates a new column in the table. # @@ -37,22 +34,12 @@ module ActiveRecord @null = null @default = extract_default(default) @default_function = nil - @coder = nil end def has_default? !default.nil? end - # Casts value to an appropriate instance. - def type_cast(value) - if encoded? - coder.load(value) - else - cast_type.type_cast(value) - end - end - # Returns the human name of the column name. # # ===== Examples |