diff options
author | Ryan Rempel <rgrempel@gmail.com> | 2010-12-04 12:08:19 -0600 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-06 09:51:13 -0800 |
commit | c28fe4cbbb1121394c6bb14403350723f9ecce4c (patch) | |
tree | c1fbe67ceafd8a1f8b5562350f1bbae5405e0de6 /lib/arel/visitors/to_sql.rb | |
parent | 516ae526b34333073df7a9835952d5d499197fdd (diff) | |
download | rails-c28fe4cbbb1121394c6bb14403350723f9ecce4c.tar.gz rails-c28fe4cbbb1121394c6bb14403350723f9ecce4c.tar.bz2 rails-c28fe4cbbb1121394c6bb14403350723f9ecce4c.zip |
Make "not" apply to the whole sub-expression when generating sql.
Diffstat (limited to 'lib/arel/visitors/to_sql.rb')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index abec5317ca..2713621a54 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -192,7 +192,7 @@ module Arel end def visit_Arel_Nodes_Not o - "NOT #{visit o.expr}" + "NOT (#{visit o.expr})" end def visit_Arel_Table o |