Update the README with a description of the new feature

This commit is contained in:
Tom Bowden 2017-07-12 12:09:17 +01:00
parent 15a62a2d41
commit ea72bb18be
1 changed files with 7 additions and 2 deletions

View File

@ -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
```