Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Default scope where conditions with or in rails 4 and squeel #416

@kbaum

Description

@kbaum

Hi. We are running into a problem with default scopes with or conditions when squeel is required. This problem can be reproduced easily from this project:

https://github.com/viewthespace/squeel_default_scope_or_condition_with_joins

I go into detail within the readme but to sum up, a default scope with an or condition and additional where criteria causes queries with joins from a parent to be malformed. The problem occurs without us using any squeel syntax. The project contains a test that demonstrates the problem only occurs with squeel required.

thx!
-karl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions