I'm looking to create a small icon to use in table headings, that users
can use to sort by that table heading. Click on the top half and sort
ascending, and click on the bottom half to sort desc.
Is there a way to neatly generate an image map via Rails. I want to
create output HTML something like this:
The result is that adding <%= sort_image('field_name') -%> to a view
adds a clickable sort image, as long as I also have <%= @image_maps %>
somewhere on the page. I also have to handle params[:sort_by] and
params[:order] in the controller to handle the sorting.