diff --git a/CHANGELOG.md b/CHANGELOG.md index 19d31ab46..cf5be792f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * Added optional block argument for the `sort_link` method. PR [#604](https://github.com/activerecord-hackery/ransack/pull/604), commit - [2e6667b](https://github.com/dalpo/ransack/commit/2e6667b). + [997b856](https://github.com/dalpo/ransack/commit/997b856). *Andrea Dal Ponte* diff --git a/README.md b/README.md index 10d0edea3..802dc23a5 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,14 @@ Ransack.configure do |c| end ``` +You can also use a block if your link markup is hard to fit into the label parameter: + +```erb +<%= sort_link(@q, :name) do %> + Player Name +<% end %> +``` + ### Advanced Mode "Advanced" searches (ab)use Rails' nested attributes functionality in order to @@ -775,4 +783,3 @@ directly related to bug reports, pull requests, or documentation improvements. * Spread the word on Twitter, Facebook, and elsewhere if Ransack's been useful to you. The more people who are using the project, the quicker we can find and fix bugs! -