mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Update the README with a description of the new feature
This commit is contained in:
parent
15a62a2d41
commit
ea72bb18be
1 changed files with 7 additions and 2 deletions
|
@ -200,13 +200,18 @@ initially sorting the `last_name` field by ascending order, and the
|
|||
|
||||
The sort link order indicator arrows may be globally customized by setting a
|
||||
`custom_arrows` option in an initializer file like
|
||||
`config/initializers/ransack.rb`:
|
||||
`config/initializers/ransack.rb`.
|
||||
|
||||
You can also enable a `default_arrow` which is displayed on all sortable fields
|
||||
which are not currently used in the sorting. This is disabled by default so
|
||||
nothing will be displayed:
|
||||
|
||||
```ruby
|
||||
Ransack.configure do |c|
|
||||
c.custom_arrows = {
|
||||
up_arrow: '<i class="custom-up-arrow-icon"></i>',
|
||||
down_arrow: 'U+02193'
|
||||
down_arrow: 'U+02193',
|
||||
default_arrow: '<i class="default-arrow-icon"></i>'
|
||||
}
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue