diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/concern.rb | 10 | ||||
-rw-r--r-- | activesupport/lib/active_support/notifications.rb | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/activesupport/lib/active_support/concern.rb b/activesupport/lib/active_support/concern.rb index fb7065ef3b..eeeba60839 100644 --- a/activesupport/lib/active_support/concern.rb +++ b/activesupport/lib/active_support/concern.rb @@ -4,7 +4,9 @@ module ActiveSupport # module M # def self.included(base) # base.extend ClassMethods - # scope :disabled, -> { where(disabled: true) } + # base.class_eval do + # scope :disabled, -> { where(disabled: true) } + # end # end # # module ClassMethods @@ -77,10 +79,8 @@ module ActiveSupport # module Foo # extend ActiveSupport::Concern # included do - # class_eval do - # def self.method_injected_by_foo - # ... - # end + # def self.method_injected_by_foo + # ... # end # end # end diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 099117cebb..705a4693b7 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -84,15 +84,15 @@ module ActiveSupport # resulting in the following output within the logs including a hash with the payload: # # notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { - # :controller=>"Devise::SessionsController", - # :action=>"new", - # :params=>{"action"=>"new", "controller"=>"devise/sessions"}, - # :format=>:html, - # :method=>"GET", - # :path=>"/login/sign_in", - # :status=>200, - # :view_runtime=>279.3080806732178, - # :db_runtime=>40.053 + # controller: "Devise::SessionsController", + # action: "new", + # params: {"action"=>"new", "controller"=>"devise/sessions"}, + # format: :html, + # method: "GET", + # path: "/login/sign_in", + # status: 200, + # view_runtime: 279.3080806732178, + # db_runtime: 40.053 # } # # You can also subscribe to all events whose name matches a certain regexp: |