Skip to content

Commit

Permalink
Update documentation with arrow customization info
Browse files Browse the repository at this point in the history
  • Loading branch information
garettarrowood committed Sep 27, 2016
1 parent 28dc9d1 commit a03cb4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log

## Unreleased

### Added

* Add config option to customize up and down arrows used for direction indicators in the FormHelper. PR [#726](https://github.com/activerecord-hackery/ransack/pull/726)

*Garett Arrowood*

### Fixed

* Use class attributes properly so that inheritance is respected.
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,18 @@ The sort link may be displayed without the order indicator arrow by passing
<%= sort_link(@q, :name, hide_indicator: true) %>
```

Alternatively, all sort links may be displayed without the order indicator arrow
by adding this to an initializer file like `config/initializers/ransack.rb`:
These indicator arrows may also be customized by setting them in an initializer file like `config/initializers/ransack.rb`:

```ruby
Ransack.configure do |c|
c.custom_arrows = {
up_arrow: '<i class="custom-up-arrow-icon"></i>',
down_arrow: 'U+02193'
}
end
```

Alternatively, all sort links may be displayed without the order indicator arrows:

```ruby
Ransack.configure do |c|
Expand Down

0 comments on commit a03cb4e

Please sign in to comment.