announcement-test/config/routes.rb

18 lines
364 B
Ruby

Rails.application.routes.draw do
locales = Site.find_by(site_active: true).in_use_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
resources :announcements
end
resources :announcements do
collection do
get ':uid/:title', to: 'announcements#show', as: :display
end
end
end
end