diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-01 08:58:47 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-01 09:00:05 -0700 |
commit | 8f8f8058e58dda20259c1caa61ec92542573643d (patch) | |
tree | 79c2c4c0b71d9c11a2102491fe538ccf0f7aef88 /activerecord/lib/active_record/connection_adapters | |
parent | 24637e577c0c8139434bada14911f376ec2634e9 (diff) | |
download | rails-8f8f8058e58dda20259c1caa61ec92542573643d.tar.gz rails-8f8f8058e58dda20259c1caa61ec92542573643d.tar.bz2 rails-8f8f8058e58dda20259c1caa61ec92542573643d.zip |
Stop passing the column to the connection adapter when quoting defaults
The column is no longer used for anything besides type casting, which is
what we're trying to remove from the column entirely.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb index 896691d249..18ff869ea6 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb @@ -99,9 +99,9 @@ module ActiveRecord def quote_default_expression(value, column) column.sql_type ||= type_to_sql(column.type, column.limit, column.precision, column.scale) - column.cast_type ||= type_for_column(column) + value = type_for_column(column).type_cast_for_database(value) - @conn.quote(value, column) + @conn.quote(value) end def options_include_default?(options) |