From 2e16cc9e92dfdfc8c95fffb62df80ceacbc70560 Mon Sep 17 00:00:00 2001 From: Eric Krause Date: Thu, 17 Dec 2015 12:00:30 -0700 Subject: Expanding the documentation for collection=objects for has_many :through [ci-skip] --- activerecord/lib/active_record/associations.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 04ad45f5da..462b3066ab 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1181,7 +1181,8 @@ module ActiveRecord # [collection=objects] # Replaces the collections content by deleting and adding objects as appropriate. If the :through # option is true callbacks in the join models are triggered except destroy callbacks, since deletion is - # direct. + # direct by default. You can specify dependent: :destroy or + # dependent: :nullify to override this. # [collection_singular_ids] # Returns an array of the associated objects' ids # [collection_singular_ids=ids] -- cgit v1.2.3