diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-07-03 13:24:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-07-03 13:25:26 -0300 |
commit | 719ea779ea52abd89164ce3f576286a31eccbec9 (patch) | |
tree | 60513033920212feb177383d618eedd2e6dfadd3 /activerecord | |
parent | 17d2115e3df6caf15d554b44e28177069fa3ed5b (diff) | |
download | rails-719ea779ea52abd89164ce3f576286a31eccbec9.tar.gz rails-719ea779ea52abd89164ce3f576286a31eccbec9.tar.bz2 rails-719ea779ea52abd89164ce3f576286a31eccbec9.zip |
Don't need to use delete in the options hash
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 3 |
2 files changed, 2 insertions, 3 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 0706e6ae53..ef17dfbbc5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -259,7 +259,7 @@ module ActiveRecord end # end EOV end - + # Adds index options to the indexes hash, keyed by column name # This is primarily used to track indexes that need to be created after the table # diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 8e43193f4b..65c7ef0153 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -472,9 +472,8 @@ module ActiveRecord # remove_reference(:products, :supplier, polymorphic: true) # def remove_reference(table_name, ref_name, options = {}) - polymorphic = options.delete(:polymorphic) remove_column(table_name, "#{ref_name}_id") - remove_column(table_name, "#{ref_name}_type") if polymorphic + remove_column(table_name, "#{ref_name}_type") if options[:polymorphic] end alias :remove_belongs_to :remove_reference |