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:18 -0800 |
commit | 4bec8c8e9e21c87a6beb22423fefbd23a7f8fb99 (patch) | |
tree | 01abcb3a7550a38783c08e19ef514faf8f40167d /lib | |
parent | e4ea62bdec406f0bc8692b6cfad83c17ac6773d6 (diff) | |
download | rails-4bec8c8e9e21c87a6beb22423fefbd23a7f8fb99.tar.gz rails-4bec8c8e9e21c87a6beb22423fefbd23a7f8fb99.tar.bz2 rails-4bec8c8e9e21c87a6beb22423fefbd23a7f8fb99.zip |
Make "not" apply to the whole sub-expression when generating sql.
Diffstat (limited to 'lib')
-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 082196ef2b..35a0d9746f 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -221,7 +221,7 @@ module Arel end def visit_Arel_Nodes_Not o - "NOT #{visit o.expr}" + "NOT (#{visit o.expr})" end def visit_Arel_Table o |