personal-course/config/routes.rb

34 lines
1013 B
Ruby
Raw Normal View History

2015-12-29 11:35:44 +00:00
Rails.application.routes.draw do
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
get 'course_setting' => "courses#setting"
resources :courses do
collection do
get 'toggle_hide' => 'courses#toggle_hide'
2016-06-07 07:12:13 +00:00
get 'analysis'
get 'analysis_report'
get "download_excel"
2015-12-29 11:35:44 +00:00
end
end
resources :members do
collection do
scope '(:name-:uid)' do
resources :courses do
collection do
get 'frontend_setting' => 'courses#frontend_setting'
post 'update_frontend_setting' => 'courses#update_frontend_setting'
end
end
end
end
end
resources :course_semesters
resources :course_categories
post "course_categories/update_order" => "course_categories#update_order"
end
end
end