aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md70
1 files changed, 43 insertions, 27 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 09fdd84844..5588699d9b 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,45 +1,61 @@
-* `attribute_changed?` now accepts parameters which check the old and new value of the attribute
+* Passwords with spaces only allowed in `ActiveModel::SecurePassword`.
- `model.name_changed?(from: "Pete", to: "Ringo")`
+ Presence validation can be used to restore old behavior.
- *Tejas Dinkar*
+ *Yevhene Shemet*
-* Fix `has_secure_password` to honor bcrypt-ruby's cost attribute.
+* Validate options passed to `ActiveModel::Validations.validate`.
- *T.J. Schuck*
+ Preventing, in many cases, the simple mistake of using `validate` instead of `validates`.
-* Updated the `ActiveModel::Dirty#changed_attributes` method to be indifferent between using
- symbols and strings as keys.
+ *Sonny Michaud*
- *William Myers*
+* Deprecate `reset_#{attribute}` in favor of `restore_#{attribute}`.
-* 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.
+ These methods may cause confusion with the `reset_changes`, which has
+ different behaviour.
- *Bogdan Gusiev*
+ *Rafael Mendonça França*
-* Fix `has_secure_password` not to trigger `password_confirmation` validations
- if no `password_confirmation` is set.
+* Deprecate `ActiveModel::Dirty#reset_changes` in favor of `#clear_changes_information`.
- *Vladimir Kiselev*
+ Method's name is causing confusion with the `reset_#{attribute}` methods.
+ While `reset_name` sets the value of the name attribute to previous value
+ `reset_changes` only discards the changes.
-* `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.
+ *Rafael Mendonça França*
- Fixes range validations like `:a..:f` that used to pass with values like `:be`.
- Fixes #10593.
+* Added `restore_attributes` method to `ActiveModel::Dirty` API which restores
+ the value of changed attributes to previous value.
- *Charles Bergeron*
+ *Igor G.*
-* Fix regression in `has_secure_password`. When a password is set, but a
- confirmation is an empty string, it would incorrectly save.
+* Allow proc and symbol as values for `only_integer` of `NumericalityValidator`
- *Steve Klabnik* and *Phillip Calvin*
+ *Robin Mehner*
-* Deprecate `Validator#setup`. This should be done manually now in the validator's constructor.
+* `has_secure_password` now verifies that the given password is less than 72
+ characters if validations are enabled.
- *Nick Sutterer*
+ Fixes #14591.
-Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/activemodel/CHANGELOG.md) for previous changes.
+ *Akshay Vishnoi*
+
+* Remove deprecated `Validator#setup` without replacement.
+
+ See #10716.
+
+ *Kuldeep Aggarwal*
+
+* Add plural and singular form for length validator's default messages.
+
+ *Abd ar-Rahman Hamid*
+
+* Introduce `validate` as an alias for `valid?`.
+
+ This is more intuitive when you want to run validations but don't care about
+ the return value.
+
+ *Henrik Nyh*
+
+Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/activemodel/CHANGELOG.md) for previous changes.