diff options
author | Yves Senn <yves.senn@gmail.com> | 2016-02-16 11:54:49 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2016-02-16 11:54:49 +0100 |
commit | 84c18246bc73321130d112c87d18b2b2ddcfcd62 (patch) | |
tree | d504315ce880e6cf36c080bafeed53ca16b13438 /activerecord/lib/active_record/connection_adapters | |
parent | 9d378747326d26cf1afdac4433ead22967af0984 (diff) | |
parent | aedde2a33d23252053d4ba6ebdf5f0b2d000aa4b (diff) | |
download | rails-84c18246bc73321130d112c87d18b2b2ddcfcd62.tar.gz rails-84c18246bc73321130d112c87d18b2b2ddcfcd62.tar.bz2 rails-84c18246bc73321130d112c87d18b2b2ddcfcd62.zip |
Merge pull request #23614 from georgemillo/foreign_key
Let t.foreign_key use the same `to_table` twice
Conflicts:
activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 4 |
1 files changed, 2 insertions, 2 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 cb10ca9929..4f97c7c065 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -212,7 +212,7 @@ module ActiveRecord def initialize(name, temporary, options, as = nil) @columns_hash = {} @indexes = {} - @foreign_keys = {} + @foreign_keys = [] @primary_keys = nil @temporary = temporary @options = options @@ -330,7 +330,7 @@ module ActiveRecord end def foreign_key(table_name, options = {}) # :nodoc: - foreign_keys[table_name] = options + foreign_keys.push([table_name, options]) end # Appends <tt>:datetime</tt> columns <tt>:created_at</tt> and |