On 2 January 2011 03:08, Guo Yangguang <[email protected]> wrote: > i always worry if myown active_record callback conflicts with rails' > implemented corresponding one.i assume rails itself perhaps also use > active_record callback.for example: > > #myown callback > class Book < ActiveRecord::Base > def after_save > ... > > end > end > > > when i define the after_save for Book,i think perhaps this after_save > has overrided rails itself's implemented one,if so,i want to use both of > them.
I think what you want may be either class Book < ActiveRecord::Base after_save do # note, no def ..... end or class Book < ActiveRecord::Base after_save :my_after_save private def my_after_save ..... end Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

