aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-10-30 00:16:30 +0900
committerGitHub <noreply@github.com>2018-10-30 00:16:30 +0900
commitd7f48c9c39befaf23ccd63e0248a3bd5bf295ee5 (patch)
treee8c05ad3b1704d054721e9cf1202b7f48e7261b4 /activerecord/lib
parent0d68e0690f449bf815c975c25d4d74917d3cad11 (diff)
parent20ea01bd649138c46460995a3e565471b8386945 (diff)
downloadrails-d7f48c9c39befaf23ccd63e0248a3bd5bf295ee5.tar.gz
rails-d7f48c9c39befaf23ccd63e0248a3bd5bf295ee5.tar.bz2
rails-d7f48c9c39befaf23ccd63e0248a3bd5bf295ee5.zip
Merge pull request #34338 from malclocke/document_exception_class_for_restrict_with_exception
Document exception from restrict_with_exception [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index ab1e7ad269..fb1df00dc8 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1294,7 +1294,7 @@ module ActiveRecord
# * <tt>:destroy</tt> causes all the associated objects to also be destroyed.
# * <tt>:delete_all</tt> causes all the associated objects to be deleted directly from the database (so callbacks will not be executed).
# * <tt>:nullify</tt> causes the foreign keys to be set to +NULL+. Callbacks are not executed.
- # * <tt>:restrict_with_exception</tt> causes an exception to be raised if there are any associated records.
+ # * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there are any associated records.
# * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there are any associated objects.
#
# If using with the <tt>:through</tt> option, the association on the join model must be
@@ -1437,7 +1437,7 @@ module ActiveRecord
# * <tt>:destroy</tt> causes the associated object to also be destroyed
# * <tt>:delete</tt> causes the associated object to be deleted directly from the database (so callbacks will not execute)
# * <tt>:nullify</tt> causes the foreign key to be set to +NULL+. Callbacks are not executed.
- # * <tt>:restrict_with_exception</tt> causes an exception to be raised if there is an associated record
+ # * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there is an associated record
# * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there is an associated object
#
# Note that <tt>:dependent</tt> option is ignored when using <tt>:through</tt> option.