Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Rails/PrivateTransactionOption cop #1236

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Feb 10, 2024

  1. Add new Rails/PrivateTransactionOption cop

    This PR adds a new cop called `Rails/PrivateTransactionOption`.
    
    This cop checks whether `ActiveRecord::Base.transaction(joinable: _)`
    is used. The `joinable` option is a private API and is not intended
    to be called from outside Active Record core.
    
    rails/rails#39912 (comment)
    rails/rails#46182 (comment)
    
    Passing `joinable: false` may cause unexpected behavior such as the
    `after_commit` callback not firing at the appropriate time.
    wata727 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    e861a14 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2024

  1. Apply suggestions from code review

    Co-authored-by: Phil Pirozhkov <[email protected]>
    wata727 and pirj committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    c22574f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d8b64ad View commit details
    Browse the repository at this point in the history