aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-02-23 11:10:51 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-02-23 11:10:51 +0900
commit6d63b5e49a399fe246afcebad45c3c962de268fa (patch)
tree029d62a7f20e425efd8dedabe4beeeae05a038b8 /activerecord/lib/active_record/associations
parentcf629f6d2901615062a39723f442e604937bed24 (diff)
downloadrails-6d63b5e49a399fe246afcebad45c3c962de268fa.tar.gz
rails-6d63b5e49a399fe246afcebad45c3c962de268fa.tar.bz2
rails-6d63b5e49a399fe246afcebad45c3c962de268fa.zip
Use private attr_reader
Since #32028, Rails 6 requires Ruby 2.3+. No longer needed workaround for Ruby 2.2 "private attribute?" warning.
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb2
-rw-r--r--activerecord/lib/active_record/associations/preloader.rb2
-rw-r--r--activerecord/lib/active_record/associations/preloader/association.rb3
3 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
index 221c791bf8..c36386ec7e 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -58,7 +58,7 @@ module ActiveRecord
tables.first
end
- protected
+ private
attr_reader :alias_tracker
end
end
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb
index 59320431ee..1ea0aeac3a 100644
--- a/activerecord/lib/active_record/associations/preloader.rb
+++ b/activerecord/lib/active_record/associations/preloader.rb
@@ -169,7 +169,7 @@ module ActiveRecord
owners.flat_map { |owner| owner.association(reflection.name).target }
end
- protected
+ private
attr_reader :owners, :reflection
end
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb
index ec6f0df484..ddcad4504c 100644
--- a/activerecord/lib/active_record/associations/preloader/association.rb
+++ b/activerecord/lib/active_record/associations/preloader/association.rb
@@ -27,10 +27,9 @@ module ActiveRecord
end
end
- protected
+ private
attr_reader :owners, :reflection, :preload_scope, :model, :klass
- private
# The name of the key on the associated records
def association_key_name
reflection.join_primary_key(klass)