improve docs

[skip-ci] Few more lines about the syntax of predicates
This commit is contained in:
tommaso1 2018-08-27 18:02:58 +02:00 committed by GitHub
parent 688c7edb9e
commit 788a079932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ which are defined in
<% end %>
```
The argument of `f.search_field` has to be in this form:
`attribute_name[_or_attribute_name]..._predicate`
where `[_or_another_attribute_name]...` means any repetition of `_or_` plus the name of the attribute.
`cont` (contains) and `start` (starts with) are just two of the available
search predicates. See
[Constants](https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/constants.rb)