aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-03-04 11:06:43 +0000
committerGitHub <noreply@github.com>2017-03-04 11:06:43 +0000
commitd341a47fcc74be74b16798c62e95021fc2893ba4 (patch)
tree5df794c6512b64bf5ad8fb7652d812a376d82a41 /activerecord/lib
parentb5dc1f6dea1fec088c6af46eba9b675bfb64a72a (diff)
parent465357aecfcfd5ae0b1f95b8a848e38ac868999d (diff)
downloadrails-d341a47fcc74be74b16798c62e95021fc2893ba4.tar.gz
rails-d341a47fcc74be74b16798c62e95021fc2893ba4.tar.bz2
rails-d341a47fcc74be74b16798c62e95021fc2893ba4.zip
Merge pull request #28282 from kamipo/dont_share_options_with_with_reference_type_column
Don't share `options` with a reference type column
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index 5eb7787226..4682afc188 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -116,16 +116,12 @@ module ActiveRecord
private
- def as_options(value, default = {})
- if value.is_a?(Hash)
- value
- else
- default
- end
+ def as_options(value)
+ value.is_a?(Hash) ? value : {}
end
def polymorphic_options
- as_options(polymorphic, options)
+ as_options(polymorphic)
end
def index_options