announcement-test/config/routes.rb

38 lines
1.6 KiB
Ruby
Raw Normal View History

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'
2015-07-08 10:11:25 +00:00
post 'announcement/createfeed', to: 'announcements#createfeed'
2016-04-21 17:28:37 +00:00
post 'announcement/importanns', to: 'announcements#importanns'
get 'announcement/excel_format', to: 'announcements#excel_format'
2015-07-08 10:11:25 +00:00
patch 'announcement/updatefeed', to: 'announcements#updatefeed'
delete 'announcement/deletefeed', to: 'announcements#deletefeed'
2014-06-23 08:36:04 +00:00
get 'announcement/destroy_preview/:slug_title-:uid', to: 'announcements#destroy_preview'
2014-09-22 08:32:30 +00:00
get 'announcement/approve_bulletin', to: 'announcements#approve_bulletin'
2015-07-08 10:11:25 +00:00
get 'announcement/feed', to: 'announcements#feed'
get 'announcements/feedform', to: 'announcements#feedform'
get 'announcement/settings', to: 'announcements#settings'
2016-04-21 17:28:37 +00:00
get 'announcement/import', to: 'announcements#import'
post 'announcement/createsettings', to: 'announcements#createsettings'
patch 'announcement/updatesettings', to: 'announcements#updatesettings'
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
2015-07-08 10:11:25 +00:00
get "/xhr/announcements/feed/:uid" => "announcement_feeds#feed"
2015-09-11 12:28:41 +00:00
get "/xhr/announcements/rssfeed/:uid" => "announcement_feeds#rssfeed"
2015-07-08 10:11:25 +00:00
get "/xhr/announcements/feeds" => "announcement_feeds#feeds"
2015-09-14 12:04:56 +00:00
get '/xhr/announcements/announcement.json', to: 'bulletins#get_bulletins'
2014-04-01 07:12:43 +00:00
end
end