aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-09-08 23:30:10 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-09-08 23:30:10 -0700
commit44a9028f85a1d4f1a8ed3f318feb78dd352d6028 (patch)
treec9c1609221eaa24497f58774debe53c07e6190c5 /guides
parentc211924d9a2aad3be1734cc4c2eb142881c4269d (diff)
parente40c3eee125b9f5717022300e2cc044c4fdd14ff (diff)
downloadrails-44a9028f85a1d4f1a8ed3f318feb78dd352d6028.tar.gz
rails-44a9028f85a1d4f1a8ed3f318feb78dd352d6028.tar.bz2
rails-44a9028f85a1d4f1a8ed3f318feb78dd352d6028.zip
Merge pull request #16846 from prathamesh-sonpatki/document-error-handling-in-transactions-callbacks
Update upgrading guide about error handling in transactional callbacks [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 98faaafc2d..e5abdaf518 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -67,7 +67,22 @@ TODO: mention https://github.com/rails/rails/pull/16526
### Error handling in transaction callbacks
-TODO: mention https://github.com/rails/rails/pull/16537
+Currently, Active Record suppresses errors raised
+within `after_rollback` or `after_commit` callbacks and only prints them to
+the logs. In the next version, these errors will no longer be suppressed.
+Instead, the errors will propagate normally just like in other Active
+Record callbacks.
+
+When you define a `after_rollback` or `after_commit` callback now, you
+will receive a deprecation warning about this upcoming change. When
+you are ready, you can opt into the new behvaior and remove the
+deprecation warning by adding following configuration to your
+`config/application.rb`:
+
+ config.active_record.raise_in_transactional_callbacks = true
+
+See [#14488](https://github.com/rails/rails/pull/14488) and
+[#16537](https://github.com/rails/rails/pull/16537) for more details.
### Serialized attributes