Skip to content

Commit e2ee7eb

Browse files
authored
Update using-predicates.md (#1313)
1 parent 79a501b commit e2ee7eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/getting-started/using-predicates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You can also combine predicates for OR queries:
2323
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`:
2424

2525
```ruby
26-
>> User.ransack(account_foo_or_account_bar: 'val').result.to_sql
26+
>> User.ransack(account_foo_or_account_bar_cont: 'val').result.to_sql
2727
=> SELECT "users".* FROM "users" INNER JOIN accounts ON accounts.user_id = users.id WHERE ("accounts.foo LIKE '%val%' OR accounts.bar LIKE '%val%')
2828
```
2929

0 commit comments

Comments
 (0)