Add rails routes for Project tabs
Proposal
We want 2 tabs - Active, Inactive. When changing these tabs the URL should update so if you refresh you stay on the same tab. The URLs should be:
/admin/projects/active/admin/projects/inactive
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 :projects, only: [:index] do
collection do
get :active, :inactive, to: 'projects#index'
end
end
Edited by Christina Lohr