2014-04-01 07:12:43 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
|
2014-04-10 09:52:43 +00:00
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
2014-04-10 03:52:59 +00:00
|
|
|
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
2014-04-03 03:18:02 +00:00
|
|
|
namespace :admin do
|
2014-06-17 10:46:52 +00:00
|
|
|
post 'announcement/preview', to: 'announcements#preview'
|
2014-04-03 03:18:02 +00:00
|
|
|
resources :announcements
|
|
|
|
end
|
|
|
|
|
2014-04-01 07:12:43 +00:00
|
|
|
resources :announcements do
|
|
|
|
collection do
|
2014-05-02 10:21:51 +00:00
|
|
|
get ':slug_title-:uid', to: 'announcements#show', as: :display
|
2014-04-01 07:12:43 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|