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 EnforcedStyle to Rails/WhereExists to allow opposite style #341

Closed
dvandersluis opened this issue Sep 2, 2020 · 0 comments · Fixed by #342
Closed

Add EnforcedStyle to Rails/WhereExists to allow opposite style #341

dvandersluis opened this issue Sep 2, 2020 · 0 comments · Fixed by #342
Labels
enhancement New feature or request

Comments

@dvandersluis
Copy link
Member

Make Rails/WhereExists configurable so that where(...).exists? can be prefered over exists?(...) if desired.

Many codebases prefer the style that is now disallowed by the existing cop. By making it configurable, either style can be chosen while still maintaining consistency in the codebase.

Re #286.

dvandersluis added a commit to dvandersluis/rubocop-rails that referenced this issue Sep 2, 2020
@koic koic added the enhancement New feature or request label Sep 3, 2020
dvandersluis added a commit to dvandersluis/rubocop-rails that referenced this issue Sep 3, 2020
@koic koic closed this as completed in #342 Sep 3, 2020
koic added a commit that referenced this issue Sep 3, 2020
[Fix #341] Add EnforcedStyle to Rails/WhereExists to allow where(...).exists? to be the enforced style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants