mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Wrap 80 characters [skip ci]
This commit is contained in:
parent
69d13b2c64
commit
f174a4ff5d
1 changed files with 4 additions and 1 deletions
|
@ -461,7 +461,10 @@ Employee.search({ active: true, hired_since: '2013-01-01' })
|
|||
Employee.search({ salary_gt: 100_000 }, { auth_object: current_user })
|
||||
```
|
||||
|
||||
If the `true` value is being passed via url params or by some other mechanism that will convert it to a string (i.e. `"active" => "true"`), the true value will *not* be passed to the scope. If you want to pass a `'true'` string to the scope, you should wrap it in an array (i.e. `"active" => ['true']`).
|
||||
If the `true` value is being passed via url params or by some other mechanism
|
||||
that will convert it to a string (i.e. `"active" => "true"`), the true value
|
||||
will *not* be passed to the scope. If you want to pass a `'true'` string to the
|
||||
scope, you should wrap it in an array (i.e. `"active" => ['true']`).
|
||||
|
||||
Scopes are a recent addition to Ransack and currently have a few caveats:
|
||||
First, a scope involving child associations needs to be defined in the parent
|
||||
|
|
Loading…
Reference in a new issue