diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-05 15:56:42 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-05 15:56:42 +0200 |
commit | 9989d3337f2ec38388538e605f5dc01aa8b58ae4 (patch) | |
tree | d154bf5b597118a4841556a60140b55112ef1083 /activesupport/lib/active_support | |
parent | 117b096d0a91ff7a8fb704b359a6fdf1ccc20e7c (diff) | |
parent | 02572399a588110709c2988fab66e2d65d735bfc (diff) | |
download | rails-9989d3337f2ec38388538e605f5dc01aa8b58ae4.tar.gz rails-9989d3337f2ec38388538e605f5dc01aa8b58ae4.tar.bz2 rails-9989d3337f2ec38388538e605f5dc01aa8b58ae4.zip |
Merge remote branch 'docrails/master'
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/concern.rb | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 50a4ce695e..85cd4db002 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -571,9 +571,9 @@ module ActiveSupport # # would trigger <tt>Audit#before_save</tt> instead. That's constructed by calling # <tt>"#{kind}_#{name}"</tt> 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 <tt>ActiveSupport::Concern</tt> above module could be written as: +# By using <tt>ActiveSupport::Concern</tt> 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 |