diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-05-30 14:22:17 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-05-30 14:22:17 +0200 |
commit | 4321cd09a5b81fee278e39564d4729784732611c (patch) | |
tree | e1b968ed5c084d0edc6eed0c755ca53aaefe9f90 /activerecord/lib/active_record/connection_adapters/column.rb | |
parent | b9eeb0339df7bd746273d680a26258df78dbd262 (diff) | |
download | rails-4321cd09a5b81fee278e39564d4729784732611c.tar.gz rails-4321cd09a5b81fee278e39564d4729784732611c.tar.bz2 rails-4321cd09a5b81fee278e39564d4729784732611c.zip |
refactor, introduce `Type#type_cast_for_schema` to cast for schema.rb
This removes the case statement in `SchemaDumper` and gives every `Type`
the possibility to control the SchemaDumper default value output.
/cc @sgrif
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/column.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/column.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb index f66e99c9d1..4fbc55a07e 100644 --- a/activerecord/lib/active_record/connection_adapters/column.rb +++ b/activerecord/lib/active_record/connection_adapters/column.rb @@ -18,6 +18,7 @@ module ActiveRecord delegate :type, :precision, :scale, :limit, :klass, :accessor, :text?, :number?, :binary?, :serialized?, :type_cast, :type_cast_for_write, :raw_type_cast_for_write, :type_cast_for_database, + :type_cast_for_schema, to: :cast_type # Instantiates a new column in the table. |