From 1eef814e7a5048086aaee06a31a633db1ee098cc Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 20 Sep 2012 18:47:57 -0300 Subject: Add changelog entry and docs about class delegation using the symbol :class See #7613. [ci skip] --- activesupport/CHANGELOG.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 47f1c8458e..05a573076e 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,6 +1,22 @@ ## Rails 4.0.0 (unreleased) ## -* `Date.beginning_of_week` thread local and `beginning_of_week` application config option added (default is Monday). *Innokenty Mikhailov* +* Allow delegation to the class using the `:class` keyword, replacing + `self.class` usage: + + class User + def self.hello + "world" + end + + delegate :hello, to: :class + end + + *Marc-Andre Lafortune* + +* `Date.beginning_of_week` thread local and `beginning_of_week` application + config option added (default is Monday). + + *Innokenty Mikhailov* * An optional block can be passed to `config_accessor` to set its default value @@ -16,11 +32,14 @@ *Larry Lv* * ActiveSupport::Benchmarkable#silence has been deprecated due to its lack of - thread safety. It will be removed without replacement in Rails 4.1. *Steve - Klabnik* + thread safety. It will be removed without replacement in Rails 4.1. + + *Steve Klabnik* + +* An optional block can be passed to `Hash#deep_merge`. The block will be invoked + for each duplicated key and used to resolve the conflict. -* An optional block can be passed to `Hash#deep_merge`. The block will be invoked for each duplicated key - and used to resolve the conflict. *Pranas Kiziela* + *Pranas Kiziela* * ActiveSupport::Deprecation is now a class. It is possible to create an instance of deprecator. Backwards compatibility has been preserved. -- cgit v1.2.3