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

New cop suggestion: WhereMissing #684

Closed
fatkodima opened this issue Mar 26, 2022 · 2 comments
Closed

New cop suggestion: WhereMissing #684

fatkodima opened this issue Mar 26, 2022 · 2 comments
Labels
feature request Request for new functionality

Comments

@fatkodima
Copy link
Contributor

It should detect cases like this: https://github.com/rails/rails/pull/39136/files

I created similar code several times, have seen at least 1 such example recently in the gitlab's codebase and I'm sure, this is a popular pattern.

where.missing method docs

@andyw8
Copy link
Contributor

andyw8 commented Mar 26, 2022

Nice, I didn't know about that method, it was added in 6.1:

https://blog.saeloun.com/2020/01/21/rails-6-1-adds-query-method-missing-to-find-orphan-records.html

@Darhazer Darhazer added the feature request Request for new functionality label Jun 28, 2022
@koic
Copy link
Member

koic commented Aug 11, 2022

This issue has been resolved by #744.

@koic koic closed this as completed Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new functionality
Projects
None yet
Development

No branches or pull requests

4 participants