aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-06 09:36:13 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-06 09:36:13 -0800
commite4ea62bdec406f0bc8692b6cfad83c17ac6773d6 (patch)
tree40887946c29875f0ad282d804e8b1f73bd85c635 /lib
parentac6296ab8f9d38dbfa8149eb0c6e16d6957dd519 (diff)
parent516ae526b34333073df7a9835952d5d499197fdd (diff)
downloadrails-e4ea62bdec406f0bc8692b6cfad83c17ac6773d6.tar.gz
rails-e4ea62bdec406f0bc8692b6cfad83c17ac6773d6.tar.bz2
rails-e4ea62bdec406f0bc8692b6cfad83c17ac6773d6.zip
Merge branch '2-0-stable'
* 2-0-stable: adding a test for the dot visitor
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/nodes/node.rb2
-rw-r--r--lib/arel/visitors/dot.rb11
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/arel/nodes/node.rb b/lib/arel/nodes/node.rb
index 634e580a8f..567221aab2 100644
--- a/lib/arel/nodes/node.rb
+++ b/lib/arel/nodes/node.rb
@@ -9,7 +9,7 @@ module Arel
# Factory method to create a Nodes::Not node that has the recipient of
# the caller as a child.
def not
- Nodes::Not.new self
+ Nodes::Not.new Nodes::Grouping.new self
end
###
diff --git a/lib/arel/visitors/dot.rb b/lib/arel/visitors/dot.rb
index 2ce8b6814f..c515cbe220 100644
--- a/lib/arel/visitors/dot.rb
+++ b/lib/arel/visitors/dot.rb
@@ -84,9 +84,16 @@ module Arel
visit_edge o, "attribute"
end
- def visit_Arel_Nodes_Offset o
- visit_edge o, "value"
+ def unary o
+ visit_edge o, "expr"
end
+ alias :visit_Arel_Nodes_Group :unary
+ alias :visit_Arel_Nodes_Grouping :unary
+ alias :visit_Arel_Nodes_Having :unary
+ alias :visit_Arel_Nodes_Not :unary
+ alias :visit_Arel_Nodes_Offset :unary
+ alias :visit_Arel_Nodes_On :unary
+ alias :visit_Arel_Nodes_UnqualifiedColumn :unary
def visit_Arel_Nodes_InsertStatement o
visit_edge o, "relation"