From 48a035712e9a4478ff248fd51ff43505d2aa2ddb Mon Sep 17 00:00:00 2001 From: Steve Klabnik <steve@steveklabnik.com> Date: Thu, 20 Sep 2012 15:09:21 +0300 Subject: 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 --- activerecord/lib/active_record/migration/join_table.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3