Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

removed TIP: :allow_nil/:allow_blank is ignored by the presence validator #122

Closed
wants to merge 1 commit into from

2 participants

@ColinDKelley

These tips were documenting an inconsistency issue rails/rails#8621. that issue is resolved by rails/rails#8622.

@rafaelfranca

We don't accept pull request at docrails since everyone can push to it. Please just push it

@ColinDKelley

Will do. I think I'll wait for the Rails pull request to resolve first. I hope that goes to Rails 3 too, but if it only goes to Rails 4, would it be appropriate for this tip to stay but be modified to say "Rails 3 only"? I assume there is no separate Guide for Rails 4 yet.

@rafaelfranca

These guides are to Rails 4, since they are for the master branch. It is all done from the Rails side, the behavior was changed on master only.

@ColinDKelley

Got it. Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 26, 2012
  1. @ColinDKelley

    Removed TIP: :allow_nil/:allow_blank is ingored by the presence valid…

    ColinDKelley authored
    …ator (companion to Github Issue #8621)
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 4 deletions.
  1. +0 −4 guides/source/active_record_validations.md
View
4 guides/source/active_record_validations.md
@@ -656,8 +656,6 @@ class Coffee < ActiveRecord::Base
end
```
-TIP: `:allow_nil` is ignored by the presence validator.
-
### `:allow_blank`
The `:allow_blank` option is similar to the `:allow_nil` option. This option
@@ -673,8 +671,6 @@ Topic.create("title" => "").valid? # => true
Topic.create("title" => nil).valid? # => true
```
-TIP: `:allow_blank` is ignored by the presence validator.
-
### `:message`
As you've already seen, the `:message` option lets you specify the message that
Something went wrong with that request. Please try again.