This repository has been archived on 2023-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
nccu-announcement/config/routes.rb

22 lines
675 B
Ruby

Rails.application.routes.draw do
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
post 'announcement/preview', to: 'announcements#preview'
get 'announcement/destroy_preview/:slug_title-:uid', to: 'announcements#destroy_preview'
get 'bulletins.json', to: 'bulletins#get_bulletins'
post 'announcement/approve_bulletin', to: 'announcements#approve_bulletin'
resources :announcements
end
resources :announcements do
collection do
get ':slug_title-:uid', to: 'announcements#show', as: :display
end
end
end
end