Skip to content

Commit

Permalink
Merge pull request #19680 from vngrs/make_join_model_name_const_private
Browse files Browse the repository at this point in the history
Change join model name constant to private constant
  • Loading branch information
rafaelfranca committed Apr 7, 2015
2 parents bd51bbc + b34c981 commit d69d662
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions activerecord/lib/active_record/associations.rb
Expand Up @@ -1718,10 +1718,8 @@ def has_and_belongs_to_many(name, scope = nil, options = {}, &extension)

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

Expand Down

0 comments on commit d69d662

Please sign in to comment.