Replies: 1 comment
-
I believe this can be achieved with explicit groupings: Model.ransack(
m: "or",
g: [
{ name: 'bob', updated_at_gt: '2023-01-01' },
{ name_or_draft_name: 'bob', updated_at_or_draft_updated_at_gt > '2023-01-01' }
]
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a search that looks like:
Which has an sql query that looks something like this:
We have 'draft' association, and I'm now transforming the incoming search to look like:
And the sql query looks like this:
Which makes sense and I understanding what's going on. But what I'm do is have have a query that looks like this:
I can manipulate the search params at will, but I'm not seeing how or if I can, with ransack, build an OR query where each branch has multiple AND clauses. Is something like this possible in ransack?
Beta Was this translation helpful? Give feedback.
All reactions