Browse files

Added callback details in "supported options" of has_many association

  • Loading branch information...
1 parent 62725b1 commit abe2038d5fea7c545ffddad1ac1252c7cbab6232 @parolkar parolkar committed Jul 7, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/lib/active_record/associations.rb
View
6 activerecord/lib/active_record/associations.rb
@@ -839,6 +839,12 @@ module ClassMethods
# Specifies the name of the <tt>belongs_to</tt> association on the associated object that is the inverse of this <tt>has_many</tt>
# association. Does not work in combination with <tt>:through</tt> or <tt>:as</tt> options.
# See ActiveRecord::Associations::ClassMethods's overview on Bi-directional assocations for more detail.
+ # [:before_add]
+ # [:after_add]
+ # [:before_remove]
+ # [:after_remove]
+ # Specifies callback function/Proc which gets called before/after target object is associated / deassociated
+ # See "Association callbacks" section for more information and example.
#
# Option examples:
# has_many :comments, :order => "posted_on"

0 comments on commit abe2038

Please sign in to comment.