aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-12-04 09:09:21 -0700
committerSean Griffin <sean@thoughtbot.com>2014-12-04 09:09:21 -0700
commitba5effdc59f27bcd71f51a514a5496448bfad52c (patch)
treefbadab9942a9b9844c8aa38cdfadf344fc70e1f4 /lib/arel
parent0b720f73ce58b9670f6e611252f475be6286c4de (diff)
downloadrails-ba5effdc59f27bcd71f51a514a5496448bfad52c.tar.gz
rails-ba5effdc59f27bcd71f51a514a5496448bfad52c.tar.bz2
rails-ba5effdc59f27bcd71f51a514a5496448bfad52c.zip
Quoted nodes respond to `nil?` in the same way as `Casted` nodes
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/nodes.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/arel/nodes.rb b/lib/arel/nodes.rb
index 49000af4ab..e8de637323 100644
--- a/lib/arel/nodes.rb
+++ b/lib/arel/nodes.rb
@@ -77,6 +77,7 @@ module Arel
class Quoted < Arel::Nodes::Unary # :nodoc:
alias :val :value
+ def nil; val.nil?; end
end
def self.build_quoted other, attribute = nil