diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-16 15:52:48 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-16 15:52:48 -0300 |
commit | 654be5f042bae666c0e502b5d24fbf7e4fdf2892 (patch) | |
tree | ae892b9cd3ad2b1bf4a4d4fc6dae477881d13f1a /activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb | |
parent | 0369dbfd42328a88e9ff2643c94900ce31dbf0c8 (diff) | |
parent | 0372c5078af38081ebc273eab69687a6b9768751 (diff) | |
download | rails-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/active_record/associations/builder/has_and_belongs_to_many.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb | 4 |
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 |