diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-12-12 10:43:36 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-12-12 10:47:07 -0800 |
commit | da3891c898fd79ab28dad3ce4c9e52d876c9e4e9 (patch) | |
tree | 8f9faa6e44697f0776ab29b26110127110ec991d /activerecord/lib/active_record | |
parent | 6e2b734f56e4c789763b9a8e3922272a004a325f (diff) | |
download | rails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.tar.gz rails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.tar.bz2 rails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.zip |
make sure cached table name is a string. fixes #12582
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb index af596a3a64..e472277374 100644 --- a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb @@ -20,7 +20,7 @@ module ActiveRecord::Associations::Builder def self.build(lhs_class, name, options) if options[:join_table] - KnownTable.new options[:join_table] + KnownTable.new options[:join_table].to_s else class_name = options.fetch(:class_name) { name.to_s.camelize.singularize |