From 1beb0ff2061f7f61e7f0c3773d35b87835df7d9f Mon Sep 17 00:00:00 2001 From: Guilherme Goettems Schneider Date: Tue, 5 Oct 2021 16:02:28 +0200 Subject: [PATCH] Remove message from ActiveRecord::Rollback example Do not suggest that raising `ActiveRecord::Rollback` exception should have a message. There's no point of adding a message to `ActiveRecord::Rollback` exception because it will be rescued by transaction block and the message will be lost. --- activerecord/lib/active_record/errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index bcf16859ed730..67c4d56683df8 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -326,7 +326,7 @@ class StrictLoadingViolationError < ActiveRecordError # # The system must fail on Friday so that our support department # # won't be out of job. We silently rollback this transaction # # without telling the user. - # raise ActiveRecord::Rollback, "Call tech support!" + # raise ActiveRecord::Rollback # end # end # # ActiveRecord::Rollback is the only exception that won't be passed on