Add rails routes for Group tabs
Proposal
We want 3 tabs - Active
, Inactive
, and All
. When changing these tabs the URL should update so if you refresh you stay on the same tab. The URLs should be:
/admin/groups/active
/admin/groups/inactive
/admin/groups/all
Implementation guide
We can do the changing of URL when changing tabs with frontend routing but we need Rails routes setup so you don't get a 404 when reloading. Add the following to config/routes/admin.rb
resources :groups, only: [:index, :new, :create] do
collection do
get :active, :inactive, :all, to: 'groups#index'
end
end
Edited by 🤖 GitLab Bot 🤖