aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2012-09-20 15:09:21 +0300
committerSteve Klabnik <steve@steveklabnik.com>2012-11-21 13:21:18 -0600
commit48a035712e9a4478ff248fd51ff43505d2aa2ddb (patch)
tree83156a17d9e7eee23e3fa7e2e5dd69ba7100141d /activerecord/lib/active_record
parent2068d300917ed95a82e7377ee77b397fc4084a61 (diff)
downloadrails-48a035712e9a4478ff248fd51ff43505d2aa2ddb.tar.gz
rails-48a035712e9a4478ff248fd51ff43505d2aa2ddb.tar.bz2
rails-48a035712e9a4478ff248fd51ff43505d2aa2ddb.zip
Coerce strings in create_join_table.
If you accidentally pass a string and a symbol, this breaks. So we coerce them both to strings. Fixes #7715
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/migration/join_table.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration/join_table.rb b/activerecord/lib/active_record/migration/join_table.rb
index e880ae97bb..ebf64cbcdc 100644
--- a/activerecord/lib/active_record/migration/join_table.rb
+++ b/activerecord/lib/active_record/migration/join_table.rb
@@ -8,7 +8,7 @@ module ActiveRecord
end
def join_table_name(table_1, table_2)
- [table_1, table_2].sort.join("_").to_sym
+ [table_1.to_s, table_2.to_s].sort.join("_").to_sym
end
end
end