Skip to content

Conversation

@lovro-bikic
Copy link
Contributor

@lovro-bikic lovro-bikic commented Aug 11, 2025

Changes Rails/WhereExists so it doesn't register offenses for either:

Model.exists?(multiple, arguments)
Model.exists?(*splat_arguments)

when EnforcedStyle is where.

exists? method only accepts a single argument.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@lovro-bikic lovro-bikic force-pushed the rails-where-exists-multiple-arguments branch from cb5b704 to 6a7f8ff Compare August 11, 2025 11:58
@lovro-bikic lovro-bikic force-pushed the rails-where-exists-multiple-arguments branch from 6a7f8ff to fa67d8d Compare August 11, 2025 13:00
@koic koic merged commit 1a313ba into rubocop:master Aug 11, 2025
16 checks passed
@lovro-bikic lovro-bikic deleted the rails-where-exists-multiple-arguments branch August 11, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants