aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/relation.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-12-28 12:58:30 -0300
committerEmilio Tagua <miloops@gmail.com>2009-12-28 12:58:30 -0300
commitbd00a461e042a77aef48822040897467c544cd1a (patch)
tree8272c2d78da319bde1ab6d736ce6f66b352a25e6 /lib/arel/algebra/relations/relation.rb
parent4fe6bdf195336d54b082ca26b96c5294d8aae3d1 (diff)
downloadrails-bd00a461e042a77aef48822040897467c544cd1a.tar.gz
rails-bd00a461e042a77aef48822040897467c544cd1a.tar.bz2
rails-bd00a461e042a77aef48822040897467c544cd1a.zip
Added having to use in combination with group to filter records.
Diffstat (limited to 'lib/arel/algebra/relations/relation.rb')
-rw-r--r--lib/arel/algebra/relations/relation.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb
index b24e7c24d0..e848c8aa1c 100644
--- a/lib/arel/algebra/relations/relation.rb
+++ b/lib/arel/algebra/relations/relation.rb
@@ -43,7 +43,7 @@ module Arel
join(other_relation, OuterJoin)
end
- [:where, :project, :order, :take, :skip, :group, :from].each do |operation_name|
+ [:where, :project, :order, :take, :skip, :group, :from, :having].each do |operation_name|
class_eval <<-OPERATION, __FILE__, __LINE__
def #{operation_name}(*arguments, &block)
arguments.all?(&:blank?) && !block_given?? self : #{operation_name.to_s.classify}.new(self, *arguments, &block)
@@ -131,6 +131,7 @@ module Arel
def orders; [] end
def inserts; [] end
def groupings; [] end
+ def havings; [] end
def joins(formatter = nil); nil end # FIXME
def taken; nil end
def skipped; nil end