From 0372c5078af38081ebc273eab69687a6b9768751 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Fri, 16 May 2014 11:36:48 -0700 Subject: Remove the assignment for real this time. cc: https://github.com/rails/rails/commit/a11e2fcff8cdc9691b977d8330abe63024f8c732#commitcomment-6353614 and 0369dbf --- .../lib/active_record/associations/builder/has_and_belongs_to_many.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3