From 24967231fb3f7703af2862154131521cff2a5ff2 Mon Sep 17 00:00:00 2001 From: Maksym Shcherban Date: Wed, 13 Apr 2022 16:24:26 +0200 Subject: [PATCH] Update using-predicates.md --- docs/docs/getting-started/using-predicates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started/using-predicates.md b/docs/docs/getting-started/using-predicates.md index bf1680b7..6faecfbf 100644 --- a/docs/docs/getting-started/using-predicates.md +++ b/docs/docs/getting-started/using-predicates.md @@ -23,7 +23,7 @@ You can also combine predicates for OR queries: The syntax for `OR` queries on an associated model is not immediately obvious, but makes sense. Assuming a `User` `has_one` `Account` and the `Account` has `attributes` `foo` and `bar`: ```ruby ->> User.ransack(account_foo_or_account_bar: 'val').result.to_sql +>> User.ransack(account_foo_or_account_bar_cont: 'val').result.to_sql => SELECT "users".* FROM "users" INNER JOIN accounts ON accounts.user_id = users.id WHERE ("accounts.foo LIKE '%val%' OR accounts.bar LIKE '%val%') ```