title: validates_uniqueness_of passes on nil or blank (without allow_nil and allow_blank)
body: <p><a href="http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M002167" rel="noreferrer">The uniqueness validator of ActiveRecord</a> has an options to skip validation if the value is nil or blank. Even if I set both parameters to true (the default behaviour) I can create one record with nil and blank before the validation hits. I use the default SQlite3 Database sqlite3-ruby (1.2.5).</p>
  
  <p>Edit for clarification: I get the expected result if I add <code>validates_presence_of</code> to the Model. I thought that the default behaviour of <code>validates_uniqueness_of</code> would make this redundant.</p>
  
  <p><strong>Testcase:</strong></p>
  
  <pre><code>rails validation_test
  cd validation_test/
  script/generate Model Thing identification:string
  rake db:migrate
  </code></pre>
  
  <p>Content of app/models/thing.rb:</p>
  
  <pre><code>class Thing &lt; ActiveRecord::Base
    validates_uniqueness_of :identification
  end
  </code></pre>
  
  <p>Rails console:</p>
  
  <pre><code>script/console 
  Loading development environment (Rails 2.3.4)
  &gt;&gt; Thing.create!
  =&gt; #&lt;Thing id: 1, identification: nil, created_at: "2009-09-26 01:49:32", updated_at: "2009-09-26 01:49:32"&gt;
  &gt;&gt; Thing.create! :identification =&gt; ""
  =&gt; #&lt;Thing id: 2, identification: "", created_at: "2009-09-26 01:49:42", updated_at: "2009-09-26 01:49:42"&gt;
  &gt;&gt; Thing.create! :identification =&gt; ""
  ActiveRecord::RecordInvalid: Validation failed: Identification has already been taken
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/validations.rb:1090:in `save_without_dirty!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/dirty.rb:87:in `save_without_transactions!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in `save!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:182:in `transaction'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in `save!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/transactions.rb:200:in `save!'
      from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/validations.rb:1059:in `create!'
      from (irb):3
  &gt;&gt; Thing.count
  =&gt; 2
  </code></pre>
  
  <p>Why do the first two creations pass?</p>
  
  <p>Thanks</p>