Skip to content

Commit

Permalink
Add admin_root route
Browse files Browse the repository at this point in the history
  • Loading branch information
crespire committed Nov 17, 2024
1 parent 56ccfc5 commit 28fd2a5
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Rails.application.routes.draw do
resources :events, only: %i[index show], param: :slug do
collection do
get 'past', to: 'events#past'
get 'all', to: 'events#all', as: :all
get 'next', to: 'events#next'
end
end

namespace :admin do
root to: redirect('/admin/events')
resources :events
end

Expand All @@ -17,14 +10,19 @@
# Can be used by load balancers and uptime monitors to verify that the app is live.
get 'up' => 'rails/health#show', as: :rails_health_check

# Defines the root path route ("/")
# root "posts#index"
#
root 'events#index'
get 'past-events', to: redirect('/events/past')
get 'past_events', to: redirect('/events/past')
get 'chat', to: 'static#chat'
get 'about', to: 'static#about'
get 'calendar', to: 'static#calendar'
get 'code-of-conduct', to: 'static#coc'

resources :events, only: %i[index show], param: :slug do
collection do
get 'past', to: 'events#past'
get 'all', to: 'events#all', as: :all
get 'next', to: 'events#next'
end
end
end

0 comments on commit 28fd2a5

Please sign in to comment.