mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add CHANGELOG entry for #8622
This commit is contained in:
parent
14a61bba4d
commit
9647d4b6f4
2 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
|||
## Rails 4.0.0 (unreleased) ##
|
||||
|
||||
* Fix `validates_presence_of` with `:allow_nil` or `:allow_blank` options.
|
||||
Fixes #8621.
|
||||
|
||||
*Colin Kelley and Rafael Mendonça França*
|
||||
|
||||
* Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the
|
||||
absence of attributes.
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class PresenceValidationTest < ActiveModel::TestCase
|
|||
assert p.valid?
|
||||
end
|
||||
|
||||
def test_allow_nil
|
||||
def test_validates_presence_of_with_allow_nil_option
|
||||
Topic.validates_presence_of(:title, allow_nil: true)
|
||||
|
||||
t = Topic.new(title: "something")
|
||||
|
@ -89,7 +89,7 @@ class PresenceValidationTest < ActiveModel::TestCase
|
|||
assert t.valid?, t.errors.full_messages
|
||||
end
|
||||
|
||||
def test_allow_blank
|
||||
def test_validates_presence_of_with_allow_blank_option
|
||||
Topic.validates_presence_of(:title, allow_blank: true)
|
||||
|
||||
t = Topic.new(title: "something")
|
||||
|
|
Loading…
Reference in a new issue