aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-07 16:16:08 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-04-07 16:16:08 -0300
commitd69d662e650d5140be0c5abb72289af94747e8b7 (patch)
treed4500cd1412c023937a8eb677a79f16c84dabcee /activerecord
parentbd51bbc02842ac59b53fa7851a7da3612a474119 (diff)
parentb34c98153f3c9b26b5ba5a0b35a15157e51d3a53 (diff)
downloadrails-d69d662e650d5140be0c5abb72289af94747e8b7.tar.gz
rails-d69d662e650d5140be0c5abb72289af94747e8b7.tar.bz2
rails-d69d662e650d5140be0c5abb72289af94747e8b7.zip
Merge pull request #19680 from vngrs/make_join_model_name_const_private
Change join model name constant to private constant
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 5e3e5f709b..deecd1b7b7 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1718,10 +1718,8 @@ module ActiveRecord
join_model = builder.through_model
- # FIXME: we should move this to the internal constants. Also people
- # should never directly access this constant so I'm not happy about
- # setting it.
const_set join_model.name, join_model
+ private_constant join_model.name
middle_reflection = builder.middle_reflection join_model