aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/predicate_builder.rb
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/relation/predicate_builder.rb
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/relation/predicate_builder.rb')
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb
index f3286846d2..7a0edcbc33 100644
--- a/activerecord/lib/active_record/relation/predicate_builder.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder.rb
@@ -57,9 +57,6 @@ module ActiveRecord
end
protected
-
- attr_reader :table
-
def expand_from_hash(attributes)
return ["1=0"] if attributes.empty?
@@ -109,6 +106,7 @@ module ActiveRecord
end
private
+ attr_reader :table
def associated_predicate_builder(association_name)
self.class.new(table.associated_table(association_name))