Skip to content

Rails/SkipsModelValidations is inconsistence with touch #12

Closed
@Ana06

Description

Rails/SkipsModelValidations cop doesn't complain about the following relation:

belongs_to :user, touch: true

but it does complain in its test (Avoid using touch because it skips validations.):

it { should belong_to(:user).touch(true) }

Expected behavior

Complain in both cases or in any of them. I would say that it should also complain in the relation.

RuboCop version

0.47.1

Originally opened at rubocop/rubocop#4098

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions