diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-09-20 08:18:01 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-09-20 08:18:01 -0700 |
commit | 34088572270a1dd5a2164b6aa5fc3642cb0479cb (patch) | |
tree | c3544acc1a380c8b09cd2bf422344640beef9b68 /activesupport/CHANGELOG.md | |
parent | 218c089ae7fd997fda23cc604f18df95c58d31b0 (diff) | |
parent | d2824a347fd827bb0af3c16ffed5a3608b358ffc (diff) | |
download | rails-34088572270a1dd5a2164b6aa5fc3642cb0479cb.tar.gz rails-34088572270a1dd5a2164b6aa5fc3642cb0479cb.tar.bz2 rails-34088572270a1dd5a2164b6aa5fc3642cb0479cb.zip |
Merge pull request #12285 from dasch/dasch/allow-attaching-up-front
Allow attaching to AS::Notifications namespace up front
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 9ab81c73c8..08c4573b14 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,30 @@ +* Allow attaching event subscribers to ActiveSupport::Notifications namespaces + before they're defined. Essentially, this means instead of this: + + class JokeSubscriber < ActiveSupport::Subscriber + def sql(event) + puts "A rabbi and a priest walk into a bar..." + end + + # This call needs to happen *after* defining the methods. + attach_to "active_record" + end + + You can do this: + + class JokeSubscriber < ActiveSupport::Subscriber + # This is much easier to read! + attach_to "active_record" + + def sql(event) + puts "A rabbi and a priest walk into a bar..." + end + end + + This should make it easier to read and understand these subscribers. + + *Daniel Schierbeck* + * Add `Date#middle_of_day`, `DateTime#middle_of_day` and `Time#middle_of_day` methods. Also added `midday`, `noon`, `at_midday`, `at_noon` and `at_middle_of_day` as aliases. |