Bubbling Up Nested-transaction Failures with ActiveRecord

前端 未结 3 1854
北海茫月
北海茫月 2020-12-29 22:51

I have a method in a service object that composes operations that should be wrapped in a transaction. Some of these operations are also wrapped in transactions. For example:

3条回答
  •  天涯浪人
    2020-12-29 23:03

    Throwing a custom error is always a good option in case of nested transactions. Please find more detail on nested-transations-in-rails .

提交回复
热议问题