From 336ff8a97e9391d4111e923a9b841376110d04c9 Mon Sep 17 00:00:00 2001 From: Manoj Date: Sat, 28 Jan 2012 00:18:59 +0530 Subject: has_many/has_one, :dependent => :restrict, deprecation added. --- activerecord/lib/active_record/associations.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/lib/active_record/associations.rb') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 58725246c8..b44ab26a73 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1097,8 +1097,7 @@ module ActiveRecord # alongside this object by calling their +destroy+ method. If set to :delete_all all associated # objects are deleted *without* calling their +destroy+ method. If set to :nullify all associated # objects' foreign keys are set to +NULL+ *without* calling their +save+ callbacks. If set to - # :restrict this object raises an ActiveRecord::DeleteRestrictionError exception and - # cannot be deleted if it has any associated objects. + # :restrict this object cannot be deleted if it has any associated objects. # # If using with the :through option, the association on the join model must be # a +belongs_to+, and the records which get deleted are the join records, rather than @@ -1251,8 +1250,7 @@ module ActiveRecord # If set to :destroy, the associated object is destroyed when this object is. If set to # :delete, the associated object is deleted *without* calling its destroy method. # If set to :nullify, the associated object's foreign key is set to +NULL+. - # Also, association is assigned. If set to :restrict this object raises an - # ActiveRecord::DeleteRestrictionError exception and cannot be deleted if it has any associated object. + # If set to :restrict, this object cannot be deleted if it has any 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