Commit 9c098ef2 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

feat: group offer category index sortable

parent f336dae1
Pipeline #37558 failed with stage
in 16 minutes and 35 seconds
...@@ -3,7 +3,8 @@ class GroupOfferCategoriesController < ApplicationController ...@@ -3,7 +3,8 @@ class GroupOfferCategoriesController < ApplicationController
def index def index
authorize GroupOfferCategory authorize GroupOfferCategory
@group_offer_categories = GroupOfferCategory.all @q = GroupOfferCategory.all.ransack(params[:q])
@group_offer_categories = @q.result
end end
def show; end def show; end
...@@ -8,9 +8,9 @@ ul.list-inline ...@@ -8,9 +8,9 @@ ul.list-inline
table.table.table-striped table.table.table-striped
thead thead
tr tr
th= t_attr(:category_name) th= sort_link @q, :category_name, t_attr(:category_name)
th= 'Beschreibung' th= sort_link @q, :description, 'Beschreibung'
th= t_attr(:category_state) th= sort_link @q, :category_state, t_attr(:category_state)
th colspan='1' th colspan='1'
tbody tbody
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment