aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 65ca1f6fd3..cb53fb0d44 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -249,12 +249,12 @@ module ActiveRecord
end
def predicate_builder # :nodoc:
- @predicate_builder ||= PredicateBuilder.new(self, arel_table)
+ @predicate_builder ||= PredicateBuilder.new(table_metadata)
end
private
- def relation #:nodoc:
+ def relation # :nodoc:
relation = Relation.create(self, arel_table, predicate_builder)
if finder_needs_type_condition?
@@ -263,6 +263,10 @@ module ActiveRecord
relation
end
end
+
+ def table_metadata # :nodoc:
+ TableMetadata.new(self, arel_table)
+ end
end
# New objects can be instantiated as either empty (pass no construction parameter) or pre-set with