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 #792] Fixes a false negative for Rails/RedundantPresenceValidationOnBelongsTo #814

Conversation

PedroAugustoRamalhoDuarte
Copy link
Contributor

@PedroAugustoRamalhoDuarte PedroAugustoRamalhoDuarte commented Oct 16, 2022

Replace this text with a summary of the changes in your PR.
The more detailed you are, the better.

Fix a false negative for Rails/RedundantPresenceValidationOnBelongsTo when belongs_to have one block and one hash like belongs_to :company, -> { where(foo: true) }, inverse_of: :employee

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.
  • [ x 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.

@koic
Copy link
Member

koic commented Oct 17, 2022

Thanks for opening this PR. Can you squash your commits into one?

@koic
Copy link
Member

koic commented Oct 19, 2022

Can you squash your commits into one?

@PedroAugustoRamalhoDuarte ping :-)

@PedroAugustoRamalhoDuarte PedroAugustoRamalhoDuarte force-pushed the fix/fixes_false_negative_for_rails_redundant_presence_validation_on_belongs_to branch from ceeebe4 to 2e22634 Compare October 19, 2022 12:22
@PedroAugustoRamalhoDuarte
Copy link
Contributor Author

@koic Done!!

@koic koic merged commit e7f9546 into rubocop:master Oct 19, 2022
@koic
Copy link
Member

koic commented Oct 19, 2022

Thanks!

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