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/WhereMissing cop #744

Merged
merged 1 commit into from Aug 1, 2022
Merged

Commits on Jul 26, 2022

  1. Add new Rails/WhereMissing cop

    Refs: https://rails.rubystyle.guide/#finding-missing-relationship-records
    
    This cop is check for the use `left_joins` and `where` method
    for finding missing relationship records.
    
    ```ruby
    # bad
    Foo.left_joins(:foo).where(foos: { id: nil })
    
    # good
    Foo.where.missing(:foo)
    ```
    ydah committed Jul 26, 2022
    Copy the full SHA
    1d80ebb View commit details
    Browse the repository at this point in the history