diff options
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r-- | activemodel/CHANGELOG.md | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 09fdd84844..fb4b972282 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,45 +1,23 @@ -* `attribute_changed?` now accepts parameters which check the old and new value of the attribute +* Change validates_acceptance_of to accept true by default. - `model.name_changed?(from: "Pete", to: "Ringo")` + The default for validates_acceptance_of is now "1" and true. + In the past, only "1" was the default and you were required to add + accept: true. - *Tejas Dinkar* +* Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and + `ActiveModel::Dirty#reset_changes`. -* Fix `has_secure_password` to honor bcrypt-ruby's cost attribute. + *Rafael Mendonça França* - *T.J. Schuck* +* Change the way in which callback chains can be halted. -* Updated the `ActiveModel::Dirty#changed_attributes` method to be indifferent between using - symbols and strings as keys. + The preferred method to halt a callback chain from now on is to explicitly + `throw(:abort)`. + In the past, returning `false` in an ActiveModel or ActiveModel::Validations + `before_` callback had the side effect of halting the callback chain. + This is not recommended anymore and, depending on the value of the + `config.active_support.halt_callback_chains_on_return_false` option, will + either not work at all or display a deprecation warning. - *William Myers* -* Added new API methods `reset_changes` and `changes_applied` to `ActiveModel::Dirty` - that control changes state. Previsously you needed to update internal - instance variables, but now API methods are available. - - *Bogdan Gusiev* - -* Fix `has_secure_password` not to trigger `password_confirmation` validations - if no `password_confirmation` is set. - - *Vladimir Kiselev* - -* `inclusion` / `exclusion` validations with ranges will only use the faster - `Range#cover` for numerical ranges, and the more accurate `Range#include?` - for non-numerical ones. - - Fixes range validations like `:a..:f` that used to pass with values like `:be`. - Fixes #10593. - - *Charles Bergeron* - -* Fix regression in `has_secure_password`. When a password is set, but a - confirmation is an empty string, it would incorrectly save. - - *Steve Klabnik* and *Phillip Calvin* - -* Deprecate `Validator#setup`. This should be done manually now in the validator's constructor. - - *Nick Sutterer* - -Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/activemodel/CHANGELOG.md) for previous changes. +Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/activemodel/CHANGELOG.md) for previous changes. |