aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-16 15:31:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-05-16 15:31:51 -0300
commit0369dbfd42328a88e9ff2643c94900ce31dbf0c8 (patch)
tree86b9e1848c8b46e20e0909d52db0fa93b5cfffaf /activerecord
parente5f840ca4625a1a4fc7202202e1645aba30af38c (diff)
downloadrails-0369dbfd42328a88e9ff2643c94900ce31dbf0c8.tar.gz
rails-0369dbfd42328a88e9ff2643c94900ce31dbf0c8.tar.bz2
rails-0369dbfd42328a88e9ff2643c94900ce31dbf0c8.zip
prepend mutates the string so we can remove the assignment
Diffstat (limited to 'activerecord')
-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 a297439214..afbf6dfb94 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
@@ -26,7 +26,7 @@ module ActiveRecord::Associations::Builder
model_name = name.to_s.camelize.singularize
if parent_name = lhs_class.parent_name
- model_name = model_name.prepend("#{parent_name}::")
+ model_name.prepend("#{parent_name}::")
end
model_name