Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/docs/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ Ransack.configure do |config|
# This can also be configured individually in each sort link (see the README).
config.hide_sort_order_indicators = true

# By default, Ransack displays sort order indicator arrows with HTML codes, but
# these can be overridden.
config.custom_arrows = {
up_arrow: '<i class="fa fa-long-arrow-up"></i>', # default: '&#9660;'
down_arrow: 'U+02193', # default: '&#9650;'
default_arrow: 'U+11047' # default: nil
}

# Ransack sanitizes many values in your custom scopes into booleans.
# You can turn this off for custom scopes.
config.sanitize_custom_scope_booleans = false

# Configure a default predicate if an unknown predicate is passed; setting it to
# e.g. 'eq' allows for allowing for exact matches by just the attribute name.
config.default_predicate = 'eq'

# Postgres has a nulls first / nulls last option, this can be configured.
config.postgres_fields_sort_option = :nulls_first # or e.g. :nulls_always_last
end
```

Expand Down
Loading