Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #16781 from kamipo/move_column_option_handling

Move column option handling to new_column_definition
  • Loading branch information...
commit ea1a02878cc41294d7a960e183301e6fb9784a15 2 parents 3cce762 + f6767b9
@senny senny authored
View
1  activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -325,7 +325,6 @@ def new_column_definition(name, type, options) # :nodoc:
end
column.limit = limit
- column.array = options[:array] if column.respond_to?(:array)
column.precision = options[:precision]
column.scale = options[:scale]
column.default = options[:default]
View
8 activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
@@ -131,12 +131,10 @@ def primary_key(name, type = :primary_key, options = {})
column name, type, options
end
- def column(name, type = nil, options = {})
- super
- column = self[name]
+ def new_column_definition(name, type, options) # :nodoc:
+ column = super
column.array = options[:array]
-
- self
+ column
end
private
Please sign in to comment.
Something went wrong with that request. Please try again.