ransack
https://github.com/activerecord-hackery/ransack
Ruby
Object-based searching.
Ransack::Configuration#custom_arrows=
By default, Ransack displays sort order indicator arrows with HTML codes:
up_arrow: '▼'
down_arrow: '▲'
One or both defaults may be globally overridden in an initializer file
like `config/initializers/ransack.rb` as follows:
Ransack.configure do |config|
# Globally set the up arrow to an icon and the down arrow to unicode.
config.custom_arrows = {
up_arrow: '<i class="fa fa-long-arrow-up"></i>',
down_arrow: 'U+02193'
}
endEdit
git clone [email protected]:activerecord-hackery/ransack.git
cd ransack
open lib/ransack/configuration.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Ransack--Configuration-custom_arrows--for-pr
# Commit to gitgit add lib/ransack/configuration.rbgit commit -m "better docs for Ransack::Configuration#custom_arrows="
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Ransack--Configuration-custom_arrows--for-pr
hub pull-request
# Celebrate!