-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #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.
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters