From a63fc94aa3689f1e781ac51411ec79a81c011d8a Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 10 Aug 2012 23:45:25 +0100 Subject: fixup guides in light of :dependent changes --- activerecord/lib/active_record/associations.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d9857b8fbd..9ba3323bc7 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1205,14 +1205,14 @@ module ActiveRecord # from the association name. So has_one :manager will by default be linked to the Manager class, but # if the real class name is Person, you'll have to specify it with this option. # [:dependent] - # Controls what happens to the associated objects when - # their owner is destroyed: + # Controls what happens to the associated object when + # its owner is destroyed: # - # * :destroy causes all the associated objects to also be destroyed - # * :delete causes all the asssociated objects to be deleted directly from the database (so callbacks will not execute) - # * :nullify causes the foreign keys to be set to +NULL+. Callbacks are not executed. - # * :restrict_with_exception causes an exception to be raised if there are any associated records - # * :restrict_with_error causes an error to be added to the owner if there are any associated objects + # * :destroy causes the associated object to also be destroyed + # * :delete causes the asssociated object to be deleted directly from the database (so callbacks will not execute) + # * :nullify causes the foreign key to be set to +NULL+. Callbacks are not executed. + # * :restrict_with_exception causes an exception to be raised if there is an associated record + # * :restrict_with_error causes an error to be added to the owner if there is an associated object # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_one+ association -- cgit v1.2.3