<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -81,6 +81,11 @@ module Ambition
           &quot;#{right} IN (#{left})&quot;
         end
 
+        def nil?(column)
+          left = &quot;#{owner.table_name}.#{quote_column_name column}&quot;
+          @negated ? not_equal(left, nil) : self.==(left, nil)
+        end
+
         def downcase(column)
           &quot;LOWER(#{owner.table_name}.#{quote_column_name column})&quot;
         end</diff>
      <filename>adapters/ambitious_activerecord/lib/ambition/adapters/active_record/select.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,6 +52,16 @@ context &quot;Different types&quot; do
     sql.should == &quot;SELECT * FROM users WHERE users.name IS NOT NULL&quot;
   end
 
+  specify &quot;nil?&quot; do
+    sql = User.select { |m| m.name.nil? }.to_s
+    sql.should == &quot;SELECT * FROM users WHERE users.name IS NULL&quot;
+  end
+
+  specify &quot;!nil?&quot; do
+    sql = User.select { |m| !m.name.nil? }.to_s
+    sql.should == &quot;SELECT * FROM users WHERE users.name IS NOT NULL&quot;
+  end
+
   specify &quot;Time&quot; do
     sql = User.select { |m| m.name == Time.now }.to_s
     sql.should == &quot;SELECT * FROM users WHERE users.name = '#{Time.now.to_s(:db)}'&quot;</diff>
      <filename>adapters/ambitious_activerecord/test/types_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a8d2cdf409d42c3cf55889a1751b6d8d1c608568</id>
    </parent>
  </parents>
  <author>
    <name>Chris Wanstrath</name>
    <email>chris@ozmm.org</email>
  </author>
  <url>http://github.com/defunkt/ambition/commit/f95a94fce0cde528ea7adb26d9906d4976a21aad</url>
  <id>f95a94fce0cde528ea7adb26d9906d4976a21aad</id>
  <committed-date>2008-02-16T03:29:03-08:00</committed-date>
  <authored-date>2008-02-16T03:29:03-08:00</authored-date>
  <message>add #nil? to the activerecord adapter</message>
  <tree>a9de9527524ee2232768ee372a9dbb5474641d75</tree>
  <committer>
    <name>Chris Wanstrath</name>
    <email>chris@ozmm.org</email>
  </committer>
</commit>
