Skip to content
  • Peter Leitzen's avatar
    Enable cop rule Rails/TransactionExitStatement · 2731743f
    Peter Leitzen authored
    This cop detects exits from transaction blocks to prevent this
    deprecation warning:
    
      DEPRECATION WARNING: Using `return`, `break` or `throw` to exit a
      transaction block is
      deprecated without replacement. If the `throw` came from
      `Timeout.timeout(duration)`, pass an exception class as a second
      argument so it doesn't use `throw` to abort its block. This results
      in the transaction being committed, but in the next release of Rails
    
    Fix all offenses and all instances missed by this cop.
    2731743f