From 018a88cf7ec5605d18e050504ce4090012f68c17 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 29 Jan 2011 00:56:07 +0900 Subject: missing parentheses --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 47dc2d4a3a..e444e607d6 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -762,7 +762,7 @@ module ActiveRecord #:nodoc: :true == (@finder_needs_type_condition ||= descends_from_active_record? ? :false : :true) end - # Returns a string like 'Post id:integer, title:string, body:text' + # Returns a string like 'Post(id:integer, title:string, body:text)' def inspect if self == Base super -- cgit v1.2.3 From 38d31b0ef0b9c9616918819b5ac5b9d21c539fd7 Mon Sep 17 00:00:00 2001 From: Jesse Storimer Date: Fri, 28 Jan 2011 23:23:39 -0500 Subject: Correct docs for after_find and after_initialize --- activerecord/lib/active_record/callbacks.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 47428cfd0f..64ffcb11fe 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -25,7 +25,11 @@ module ActiveRecord # Check out ActiveRecord::Transactions for more details about after_commit and # after_rollback. # - # That's a total of ten callbacks, which gives you immense power to react and prepare for each state in the + # Lastly an after_find and after_initialize callback is triggered for each object that + # is found and instantiated by a finder, with after_initialize being triggered after new objects + # are instantiated as well. + # + # That's a total of twelve callbacks, which gives you immense power to react and prepare for each state in the # Active Record life cycle. The sequence for calling Base#save for an existing record is similar, # except that each _on_create callback is replaced by the corresponding _on_update callback. # @@ -185,14 +189,6 @@ module ActiveRecord # 'puts "Evaluated after parents are destroyed"' # end # - # == The +after_find+ and +after_initialize+ exceptions - # - # Because +after_find+ and +after_initialize+ are called for each object found and instantiated by a finder, - # such as Base.find(:all), we've had to implement a simple performance constraint (50% more speed - # on a simple test case). Unlike all the other callbacks, +after_find+ and +after_initialize+ will only be - # run if an explicit implementation is defined (def after_find). In that case, all of the - # callback types will be called. - # # == before_validation* returning statements # # If the returning value of a +before_validation+ callback can be evaluated to +false+, the process will be -- cgit v1.2.3 From 5a6f651a6a093f69f00fa713648213fb86748297 Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Tue, 1 Feb 2011 08:37:43 +0100 Subject: FIX not using _on_create or _on_update callbacks only _create and _update --- activerecord/lib/active_record/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 64ffcb11fe..87b77313bb 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -31,7 +31,7 @@ module ActiveRecord # # That's a total of twelve callbacks, which gives you immense power to react and prepare for each state in the # Active Record life cycle. The sequence for calling Base#save for an existing record is similar, - # except that each _on_create callback is replaced by the corresponding _on_update callback. + # except that each _create callback is replaced by the corresponding _update callback. # # Examples: # class CreditCard < ActiveRecord::Base -- cgit v1.2.3