module Ransack::Helpers::FormHelper
def sort_url(search_object, attribute, *args)
<%= sort_url(@q, :created_at, default_order: :desc) %>
+sort_url+
def sort_url(search_object, attribute, *args) search, routing_proxy = extract_search_and_routing_proxy(search_object) unless Search === search raise TypeError, 'First argument must be a Ransack::Search!' end s = SortLink.new(search, attribute, args, params) url(routing_proxy, s.url_options) end