Skip to content
Browse files

Copy-edits in the ActiveSupport::Subscriber documentation.

Thank you @fxn :green_heart::yellow_heart::heart::purple_heart::blue_heart:

[ci skip]
  • Loading branch information...
1 parent e63eb42 commit 12d839cdaf850ceb102b96ba873c2ac8e926a6b9 @rafaelfranca rafaelfranca committed Apr 16, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 activesupport/lib/active_support/subscriber.rb
View
11 activesupport/lib/active_support/subscriber.rb
@@ -1,6 +1,6 @@
module ActiveSupport
# ActiveSupport::Subscriber is an object set to consume
- # ActiveSupport::Notifications. The subscriber dispatches notifications to
+ # ActiveSupport::Notifications. The subscriber dispatches notifications to
# a registered object based on its given namespace.
#
# An example would be Active Record subscriber responsible for collecting
@@ -16,15 +16,14 @@ module ActiveSupport
#
# And it's finally registered as:
#
- # ActiveRecord::Subscriber.attach_to :active_record
+ # ActiveRecord::StatsSubscriber.attach_to :active_record
#
# Since we need to know all instance methods before attaching the log
- # subscriber, the line above should be called after your
- # <tt>ActiveRecord::Subscriber</tt> definition.
+ # subscriber, the line above should be called after your subscriber definition.
#
# After configured, whenever a "sql.active_record" notification is published,
# it will properly dispatch the event (ActiveSupport::Notifications::Event) to
- # the `sql` method.
+ # the +sql+ method.
class Subscriber
class << self
@@ -45,7 +44,7 @@ def subscribers
end
def initialize
- @queue_key = [self.class.name, object_id].join "-"
+ @queue_key = [self.class.name, object_id].join "-"
super
end

1 comment on commit 12d839c

@fxn
Ruby on Rails member
fxn commented on 12d839c Apr 16, 2013

:heart:

Please sign in to comment.
Something went wrong with that request. Please try again.