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

[Fix #12] Allow passing boolean literals to touch #232

Merged
merged 1 commit into from
Apr 12, 2020

Commits on Apr 11, 2020

  1. [Fix rubocop#12] Allow passing boolean literals to touch

    The `Rails/SkipsModelValidations` cop currently incorrectly registers an
    offense for the `touch` method from Shoulda Matchers' associations DSL:
    
        it { is_expected.to belong_to(:user).touch(true) }
    
    Active Record's `touch` method accepts attribute names, so we can treat
    `touch` calls that pass boolean literal arguments as false positives.
    eugeneius committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    95064f6 View commit details
    Browse the repository at this point in the history