1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00

Merge pull request #963 from tommaso1/improved_readme

improve docs
This commit is contained in:
Greg Molnar 2018-09-05 06:51:38 +02:00 committed by GitHub
commit c36d8b62f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)