diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 9807cfb984..765d6fe930 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -118,7 +118,7 @@ module Arel end %w{ - having group order project + having group order }.each do |op| class_eval <<-OPERATION, __FILE__, __LINE__ def #{op}(*args) @@ -127,6 +127,10 @@ module Arel OPERATION end + def project *args + args.empty? ? self : Project.new(self, args) + end + def where clause = nil clause ? Where.new(self, Array(clause)) : self end |