From 2ce8455cc994c788a44f5b414769cb2dbee4577d Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Sun, 27 Jan 2019 11:18:40 +0100 Subject: Support before_reset callback in CurrentAttributes This is useful when we need to do some work associated to `Current.reset` but that work depends on the values of the current attributes themselves. This cannot be done in the supported `resets` callback because when the block is executed, CurrentAttributes's instance has already been reset. For symmetry, `after_reset` is defined as alias of `resets`. --- activesupport/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 684ecddb18..13b82c1ff3 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,10 +1,13 @@ +* Add `before_reset` callback to `CurrentAttributes` and define `after_reset` as an alias of `resets` for symmetry. + + *Rosa Gutierrez* + * Add `ActiveSupport::HashWithIndifferentAccess#assoc`. `assoc` can now be called with either a string or a symbol. *Stefan Schüßler* - ## Rails 6.0.0.beta1 (January 18, 2019) ## * Remove deprecated `Module#reachable?` method. -- cgit v1.2.3