aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/aggregation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/relations/aggregation.rb')
-rw-r--r--lib/arel/relations/aggregation.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/relations/aggregation.rb b/lib/arel/relations/aggregation.rb
index 55f24997cc..4c4ef0dfed 100644
--- a/lib/arel/relations/aggregation.rb
+++ b/lib/arel/relations/aggregation.rb
@@ -22,4 +22,10 @@ module Arel
self.class == other.class and self.relation == other.relation
end
end
+
+ class Relation
+ def externalize
+ aggregation?? Aggregation.new(self) : self
+ end
+ end
end \ No newline at end of file