18 lines
378 B
Ruby
18 lines
378 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
|
|
resources :announcements
|
|
end
|
|
|
|
resources :announcements do
|
|
collection do
|
|
get ':slug_title-:uid', to: 'announcements#show', as: :display
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|