personal-course/config/routes.rb

44 lines
1.3 KiB
Ruby
Raw Permalink 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"
2020-09-20 09:20:43 +00:00
get 'course_assignments'
post 'create_assignment'
get 'new_assignment'
delete 'destroy_assignment'
scope '(:name-:uid)' do
get 'edit_assignment'
patch 'update_assignment'
put 'update_assignment'
get 'show_assignments'
end
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