aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorArthur Nogueira Neves <github@arthurnn.com>2016-10-27 22:31:44 -0400
committerGitHub <noreply@github.com>2016-10-27 22:31:44 -0400
commitd48b4489204b96566345f059126556c03bb98e0c (patch)
tree778b7031aae7c9eddc853839722280d68188f546 /activerecord/lib/active_record
parent007e50d8e5a900547471b6c4ec79d9d217682c5d (diff)
parent94821b4bd10464d52b471380c49f85fac43a8ab7 (diff)
downloadrails-d48b4489204b96566345f059126556c03bb98e0c.tar.gz
rails-d48b4489204b96566345f059126556c03bb98e0c.tar.bz2
rails-d48b4489204b96566345f059126556c03bb98e0c.zip
Merge pull request #23770 from meinac/fix_habtm_symbol_class_name
Fix HABTM associations join table resolver bug on constants and symbols
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb2
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 047292b2bd..42a90b449c 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
@@ -28,7 +28,7 @@ module ActiveRecord::Associations::Builder # :nodoc:
class_name = options.fetch(:class_name) {
name.to_s.camelize.singularize
}
- KnownClass.new lhs_class, class_name
+ KnownClass.new lhs_class, class_name.to_s
end
end
end