announcement-test/config/routes.rb

17 lines
284 B
Ruby

Rails.application.routes.draw do
scope "(:locale)", locale: /en|zh_tw/ do
namespace :admin do
resources :announcements
end
resources :announcements do
collection do
get ':uid/:title', to: 'announcements#show', as: :display
end
end
end
end