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

Bug: Mongoid bug related to Rails/WhereNotWithMultipleConditions #938

Closed
johnnyshields opened this issue Feb 22, 2023 · 0 comments · Fixed by #954
Closed

Bug: Mongoid bug related to Rails/WhereNotWithMultipleConditions #938

johnnyshields opened this issue Feb 22, 2023 · 0 comments · Fixed by #954
Labels
bug Something isn't working

Comments

@johnnyshields
Copy link

johnnyshields commented Feb 22, 2023

I use Rails with the Mongoid ORM. This is valid syntax in Mongoid, but it triggers an error using the Rails cop.

      @repeat_allocations ||= shop.repeat_blockages
                                  .allocation
                                  .where.not.lt(end_date: options[:date])
                                  .ne(table_ids: [])
                                  .reorder(start_date: :asc)
                                  .to_a
1 error occurred:
An error occurred while Rails/WhereNotWithMultipleConditions cop was inspecting...
@koic koic added the bug Something isn't working label Mar 15, 2023
koic added a commit to koic/rubocop-rails that referenced this issue Mar 15, 2023
…ons`

Fixes rubocop#938.

This PR fixes an error for `Rails/WhereNotWithMultipleConditions`
when using `where.not.lt(condition)` as a Mongoid API'.
@koic koic closed this as completed in #954 Mar 15, 2023
koic added a commit that referenced this issue Mar 15, 2023
…th_multiple_conditions

[Fix #938] Fix an error for `Rails/WhereNotWithMultipleConditions`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants