diff options
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index eaaa3df061..b05a068dc1 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,43 @@ +* `Cache#fetch` instrumentation marks whether it was a `:hit`. + + *Robin Clowers* + +* `assert_difference` and `assert_no_difference` now returns the result of the + yielded block. + + Example: + + post = assert_difference -> { Post.count }, 1 do + Post.create + end + + *Lucas Mazza* + +* Short-circuit `blank?` on date and time values since they are never blank. + + Fixes #21657 + + *Andrew White* + +* Replaced deprecated `ThreadSafe::Cache` with its successor `Concurrent::Map` now that + the thread_safe gem has been merged into concurrent-ruby. + + *Jerry D'Antonio* + +* Updated Unicode version to 8.0.0 + + *Anshul Sharma* + +* `number_to_currency` and `number_with_delimiter` now accept custom `delimiter_pattern` option + to handle placement of delimiter, to support currency formats like INR + + Example: + + number_to_currency(1230000, delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/, unit: '₹', format: "%u %n") + # => '₹ 12,30,000.00' + + *Vipul A M* + * Deprecate `:prefix` option of `number_to_human_size` with no replacement. *Jean Boussier* @@ -252,30 +292,24 @@ The preferred method to halt a callback chain from now on is to explicitly `throw(:abort)`. - In the past, returning `false` in an ActiveSupport callback had the side - effect of halting the callback chain. This is not recommended anymore and, - depending on the value of - `Callbacks::CallbackChain.halt_and_display_warning_on_return_false`, will - either not work at all or display a deprecation warning. + In the past, callbacks could only be halted by explicitly providing a + terminator and by having a callback match the conditions of the terminator. -* Add `Callbacks::CallbackChain.halt_and_display_warning_on_return_false` +* Add `ActiveSupport.halt_callback_chains_on_return_false` - Setting `Callbacks::CallbackChain.halt_and_display_warning_on_return_false` - to `true` will let an app support the deprecated way of halting callback - chains by returning `false`. + Setting `ActiveSupport.halt_callback_chains_on_return_false` + to `true` will let an app support the deprecated way of halting Active Record, + and Active Model callback chains by returning `false`. Setting the value to `false` will tell the app to ignore any `false` value - returned by callbacks, and only halt the chain upon `throw(:abort)`. - - The value can also be set with the Rails configuration option - `config.active_support.halt_callback_chains_on_return_false`. + returned by those callbacks, and only halt the chain upon `throw(:abort)`. When the configuration option is missing, its value is `true`, so older apps ported to Rails 5.0 will not break (but display a deprecation warning). For new Rails 5.0 apps, its value is set to `false` in an initializer, so these apps will support the new behavior by default. - *claudiob* + *claudiob*, *Roque Pinel* * Changes arguments and default value of CallbackChain's `:terminator` option |