lib/generators/dry_crud/templates/app/controllers/list_controller.rb
# Enhance the list entries with an optional sort order.
Enhance the list entries with an optional sort order.
Enhance the list entries with an optional sort order .
def list_entries_with_sort
      if params[:sort].present? && sortable?(params[:sort])
        list_entries_without_sort.reorder(sort_expression)
      else
        list_entries_without_sort
      end
    end
def list_entries_with_sort if params [ :sort ] . present? && sortable? ( params [ :sort ] ) list_entries_without_sort . reorder ( sort_expression ) else list_entries_without_sort end end
Enhance the list entries with an optional sort order.
Enhance the list entries with an optional sort order .