1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

scope is always a Relation

This commit is contained in:
Santiago Pastorino 2011-02-01 17:20:24 -02:00
parent c2aca3ddd7
commit 451ad38bb2

View file

@ -188,9 +188,7 @@ module ActiveRecord
if select = select_value
scope = scope.select(select)
end
if Relation === scope
scope = scope.extending(*Array.wrap(@reflection.options[:extend]))
end
scope = scope.extending(*Array.wrap(@reflection.options[:extend]))
scope.where(construct_owner_conditions)
end