diff options
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r-- | activemodel/CHANGELOG.md | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 1503b6a3e4..cdba0cee12 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,32 +1,32 @@ -## Rails 5.1.0.beta1 (February 23, 2017) ## +* Fix methods `#keys`, `#values` in `ActiveModel::Errors`. -* Remove deprecated behavior that halts callbacks when the return is false. + Change `#keys` to only return the keys that don't have empty messages. - *Rafael Mendonça França* + Change `#values` to only return the not empty values. -* Remove unused `ActiveModel::TestCase` class. + Example: - *Yuji Yaginuma* + # Before + person = Person.new + person.errors.keys # => [] + person.errors.values # => [] + person.errors.messages # => {} + person.errors[:name] # => [] + person.errors.messages # => {:name => []} + person.errors.keys # => [:name] + person.errors.values # => [[]] -* Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record + # After + person = Person.new + person.errors.keys # => [] + person.errors.values # => [] + person.errors.messages # => {} + person.errors[:name] # => [] + person.errors.messages # => {:name => []} + person.errors.keys # => [] + person.errors.values # => [] - *Iain Beeston* + *bogdanvlviv* -* Allow indifferent access in `ActiveModel::Errors`. - `#include?`, `#has_key?`, `#key?`, `#delete` and `#full_messages_for`. - - *Kenichi Kamiya* - -* Removed deprecated `:tokenizer` in the length validator. - - *Rafael Mendonça França* - -* Removed deprecated methods in `ActiveModel::Errors`. - - `#get`, `#set`, `[]=`, `add_on_empty` and `add_on_blank`. - - *Rafael Mendonça França* - - -Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activemodel/CHANGELOG.md) for previous changes. +Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activemodel/CHANGELOG.md) for previous changes. |