diff options
author | Oliver Jakubiec <ojakubiec@gmail.com> | 2013-04-02 18:45:28 -0700 |
---|---|---|
committer | Oliver Jakubiec <ojakubiec@gmail.com> | 2013-04-02 18:45:28 -0700 |
commit | b13789c30cc991e2c0b20f16705a88e45c91dcad (patch) | |
tree | a7dd94d14b8d62c4c48fb89d9a089eeac079a9b1 /activemodel/CHANGELOG.md | |
parent | 8917a5b949856f8ef44d03d98470614c8cf8bbee (diff) | |
parent | 919c86d2d5e7b74b96305c0bfb0482bbe61d99f2 (diff) | |
download | rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.tar.gz rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.tar.bz2 rails-b13789c30cc991e2c0b20f16705a88e45c91dcad.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r-- | activemodel/CHANGELOG.md | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index c6d7b0b5d3..e4c80b1bf8 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,5 +1,31 @@ ## Rails 4.0.0 (unreleased) ## +* Add ActiveModel::Errors#full_messages_for, a method that returns all the error + messages for a given attribute. + + *Volodymyr Shatsky* + +* Added a method so that validations can be easily cleared on a model. + For example: + + class Person + include ActiveModel::Validations + + validates_uniqueness_of :first_name + validate :cannot_be_robot + + def cannot_be_robot + errors.add(:base, 'A person cannot be a robot') if person_is_robot + end + end + + Now, if someone runs `Person.clear_validators!`, then the following occurs: + + Person.validators # => [] + Person._validate_callbacks.empty? # => true + + *John Wang* + * `has_secure_password` does not fail the confirmation validation when assigning empty String to `password` and `password_confirmation`. @@ -70,7 +96,7 @@ *Yves Senn* -* Use BCrypt's `MIN_COST` in the test environment for speedier tests when using `has_secure_pasword`. +* Use BCrypt's `MIN_COST` in the test environment for speedier tests when using `has_secure_password`. *Brian Cardarella + Jeremy Kemper + Trevor Turk* @@ -111,7 +137,7 @@ * Changed `ActiveModel::Serializers::Xml::Serializer#add_associations` to by default propagate `:skip_types, :dasherize, :camelize` keys to included associations. - It can be overriden on each association by explicitly specifying the option on one + It can be overridden on each association by explicitly specifying the option on one or more associations *Anthony Alberto* |