mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Removes unneeded caching from ActiveRecord::Base.relation
This commit is contained in:
@@ -450,12 +450,12 @@ module ActiveRecord #:nodoc:
|
||||
private
|
||||
|
||||
def relation #:nodoc:
|
||||
@relation ||= Relation.new(self, arel_table)
|
||||
relation ||= Relation.new(self, arel_table)
|
||||
|
||||
if finder_needs_type_condition?
|
||||
@relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name)
|
||||
relation.where(type_condition).create_with(inheritance_column.to_sym => sti_name)
|
||||
else
|
||||
@relation
|
||||
relation
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -489,7 +489,6 @@ module ActiveRecord #:nodoc:
|
||||
@marked_for_destruction = false
|
||||
@previously_changed = {}
|
||||
@changed_attributes = {}
|
||||
@relation = nil
|
||||
|
||||
ensure_proper_type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user