Skip to content

Commit 0530012

Browse files
authored
Merge pull request #381 from cprodhomme/patch-3
Update select2_search.md
2 parents 10ff424 + 8b75817 commit 0530012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/select2_search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you want to use url helpers, use a `proc` like on the example
2525

2626
### Options
2727

28-
* `category_id`: Notice we're using the relation field name, not the realtion itself, so you can't use `f.input :category`.
28+
* `category_id`: Notice we're using the relation field name, not the relation itself, so you can't use `f.input :category`.
2929
* `url`: This is the URL where to get the results. This URL expects an activeadmin collection Url (like the index action) or anything that uses [ransack](https://github.com/activerecord-hackery/ransack) search gem.
3030
* `response_root`: **(optional)** If a request to `url` responds with root, you can indicate the name of that root with this attribute. By default, the gem will try to infer the root from url. For example: if `url` is `GET /admin/categories`, the root will be `categories`. If you have a rootless api, you don't need to worry about this attribute.
3131
* `fields`: an array of field names where to search for matches in the related model (`Category` in this example). If we give many fields, they will be searched with an OR condition.

0 commit comments

Comments
 (0)