aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/column.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-28 08:24:59 -0700
committerSean Griffin <sean@thoughtbot.com>2014-05-29 12:12:44 -0700
commit2eb547a4d9cfb4ed1c92397921402048162f5fc8 (patch)
tree4deededa75b1e55f6bcb0c8156334c51aab560b3 /activerecord/lib/active_record/connection_adapters/column.rb
parent4a3f71b6fb07f5bbf9e43b259a7429c96752e00b (diff)
downloadrails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.tar.gz
rails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.tar.bz2
rails-2eb547a4d9cfb4ed1c92397921402048162f5fc8.zip
Refactor serialized types to be partially defined as custom properties
Many of the methods defined in `AttributeMethods::Serialization` can be refactored onto this type as well, but this is a reasonable small step. Removes the `Type` class, and the need for `decorate_columns` to handle serialized types.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/column.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/column.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb
index a62617ab47..42650e332d 100644
--- a/activerecord/lib/active_record/connection_adapters/column.rb
+++ b/activerecord/lib/active_record/connection_adapters/column.rb
@@ -15,8 +15,10 @@ module ActiveRecord
attr_reader :name, :default, :cast_type, :null, :sql_type, :default_function
- delegate :type, :precision, :scale, :limit, :klass, :text?, :number?, :binary?,
- :type_cast, :type_cast_for_write, :type_cast_for_database, to: :cast_type
+ delegate :type, :precision, :scale, :limit, :klass, :accessor,
+ :text?, :number?, :binary?, :serialized?,
+ :type_cast, :type_cast_for_write, :type_cast_for_database,
+ to: :cast_type
# Instantiates a new column in the table.
#