aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index ac71b9d1dc..014500fa28 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,4 +1,23 @@
## Rails 4.0.0 (unreleased) ##
+* Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the
+ absence of attributes.
+
+ class Person < ActiveRecord::Base
+ validates_absence_of :first_name
+ end
+
+ person = Person.new
+ person.first_name = "John"
+ person.valid?
+ => false
+ # first_name must be blank
+
+ * Roberto Vasquez Angel*
+
+* Added `ActiveModel::Errors#add_on_present` method. Adds error messages to
+ present attributes.
+
+ *Roberto Vasquez Angel*
* `[attribute]_changed?` now returns `false` after a call to `reset_[attribute]!`