title: How can allow_nil let an empty string pass the validation
body: <p>I am reading Michael Hartl's <em>Ruby On Rails Tutorial (3rd)</em>. In chapter 9, there's an example showing us how to update the user info. I got confused by the allow_nil attached here. I simplified the code as below:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_secure_password
    validates :password, presence: true, length: { minimum: 6 }, allow_nil: true
  end
  
  myuser=User.new(name: "Foo_bar",email: "test@example.com", password: "123456", password_confirmation: "123456")
  myuser.save
  myuser=User.find(myuser.id)
  myuser.update_attributes(name: "Bar_Foo",email: "test@example.com", password: "", password_confirmation: "")  # It will succeed! But WHY?
  </code></pre>
  
  <p>I understand the <code>allow_nil: true</code> skips the validation when the value being validated is nil. Nevertheless obviously, <code>password: ""</code> is not a nil value. How can <code>allow_nil: true</code> allows an empty string?</p>