aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index cfbd3076cb..daafb0b645 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -26,6 +26,7 @@ module ActiveRecord
@values = values
@offsets = {}
@loaded = false
+ @predicate_builder = PredicateBuilder.new(klass, table)
end
def initialize_copy(other)
@@ -632,6 +633,10 @@ module ActiveRecord
"#<#{self.class.name} [#{entries.join(', ')}]>"
end
+ protected
+
+ attr_reader :predicate_builder
+
private
def exec_queries
@@ -677,9 +682,5 @@ module ActiveRecord
# ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries
string.scan(/([a-zA-Z_][.\w]+).?\./).flatten.map(&:downcase).uniq - ['raw_sql_']
end
-
- def predicate_builder
- @predicate_builder ||= PredicateBuilder.new(klass, table)
- end
end
end