aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-16 15:52:48 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-16 15:52:48 -0300
commit654be5f042bae666c0e502b5d24fbf7e4fdf2892 (patch)
treeae892b9cd3ad2b1bf4a4d4fc6dae477881d13f1a /activerecord/lib
parent0369dbfd42328a88e9ff2643c94900ce31dbf0c8 (diff)
parent0372c5078af38081ebc273eab69687a6b9768751 (diff)
downloadrails-654be5f042bae666c0e502b5d24fbf7e4fdf2892.tar.gz
rails-654be5f042bae666c0e502b5d24fbf7e4fdf2892.tar.bz2
rails-654be5f042bae666c0e502b5d24fbf7e4fdf2892.zip
Merge pull request #15139 from zzak/habtm_build_model_name
Remove the assignment for real this time.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb4
1 files changed, 2 insertions, 2 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 afbf6dfb94..44486ad758 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
@@ -25,8 +25,8 @@ module ActiveRecord::Associations::Builder
class_name = options.fetch(:class_name) {
model_name = name.to_s.camelize.singularize
- if parent_name = lhs_class.parent_name
- model_name.prepend("#{parent_name}::")
+ if lhs_class.parent_name
+ model_name.prepend("#{lhs_class.parent_name}::")
end
model_name