From f544c0a32dd86d4fe2c11e9111d3403fbbab2776 Mon Sep 17 00:00:00 2001 From: Tom Stuart Date: Thu, 5 Aug 2010 09:02:30 +0100 Subject: Fix ActiveSupport::Callbacks' define_callbacks and ActiveSupport::Concern documentation to look like native English --- activesupport/lib/active_support/callbacks.rb | 6 +++--- activesupport/lib/active_support/concern.rb | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index adabdd3388..4950d009d1 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -568,9 +568,9 @@ module ActiveSupport # # would trigger Audit#before_save instead. That's constructed by calling # "#{kind}_#{name}" on the given instance. In this case "kind" is "before" and - # "name" is "save". In this context treat ":kind" and ":name" as special thing where - # ":kind" refers to "callback type(before/after)" and ":name" refers to the method on - # which callbacks are being defined. + # "name" is "save". In this context ":kind" and ":name" have special meanings: ":kind" + # refers to the kind of callback (before/after/around) and ":name" refers to the + # method on which callbacks are being defined. # # A declaration like # diff --git a/activesupport/lib/active_support/concern.rb b/activesupport/lib/active_support/concern.rb index 408d327dd7..2d87e8d0e5 100644 --- a/activesupport/lib/active_support/concern.rb +++ b/activesupport/lib/active_support/concern.rb @@ -4,33 +4,33 @@ # def self.included(base) # base.send(:extend, ClassMethods) # base.send(:include, InstanceMethods) -# scope :foo, :conditions => {:created_at => nil} +# scope :foo, :conditions => { :created_at => nil } # end # # module ClassMethods -# def cm; puts 'I am class method'; end +# def cm; puts 'I am a class method'; end # end # # module InstanceMethods -# def im; puts 'I am instance method'; end +# def im; puts 'I am an instance method'; end # end # end # -# By using ActiveSupport::Concern above module could be written as: +# By using ActiveSupport::Concern the above module could instead be written as: # # module M # extend ActiveSupport::Concern # -# included do -# scope :foo, :conditions => {:created_at => nil} +# included do +# scope :foo, :conditions => { :created_at => nil } # end # # module ClassMethods -# def cm; puts 'I am class method'; end +# def cm; puts 'I am a class method'; end # end # # module InstanceMethods -# def im; puts 'I am instance method'; end +# def im; puts 'I am an instance method'; end # end # end module ActiveSupport -- cgit v1.2.3