Rumamge.Phoenix v2.0.0 Rummage.Phoenix.SortView View Source
Sort View Module for Rummage. This has view helpers that can generate rummagable links and forms.
Usage:
Usage:
defmodule MyApp.ProductView do
use MyApp.Web, :view
use Rummage.Phoenix.View, only: [:paginate]
end
OR
defmodule MyApp.ProductView do
use MyApp.Web, :view
use Rummage.Phoenix.View
end
Link to this section Summary
Functions
This macro includes the helpers functions for sorting.
Link to this section Functions
This macro includes the helpers functions for sorting.
Provides helpers function sort_link/3
for creating sort links in an html.eex
file of using Phoenix
.
Usage: Just add the following code in the index template. Make sure that you're passing rummage from the controller. Please look at the README for more details
<%= sort_link @conn, @rummage, field, "Name" %>
<%= sort_link @conn, {@rummage, :rummage_key}, field, "Name" %>