<% sort_field ||= @sort_field; sort_direction ||= @sort_direction; sort_columns ||= {} %> <% sort_columns['this'] ||= this.try.member_class.try.name_attribute %> <% ajax_attrs, attributes = attributes.partition_hash(HoboRapidHelper::AJAX_ATTRS) %>
<% col = sort_columns[scope.field_path] || scope.field_path sort = sort_field == col && sort_direction == 'asc' ? "-#{col}" : col sort_url = url_for_page_path(query_parameters_filtered('skip' => 'page').merge(:sort => sort)) col_heading_name = this.member_class.try.human_attribute_name(scope.field_name, :default=> scope.field_name.titleize) %>
<%= col_heading_name %>