40 lines
1.3 KiB
Ruby
40 lines
1.3 KiB
Ruby
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 'book_setting' => "books#setting"
|
|
get 'books/download_excel_format' => 'books#excel_format'
|
|
post 'books/import_from_excel' => 'books#import_from_excel'
|
|
|
|
resources :books do
|
|
collection do
|
|
post 'merge_process' => 'books#merge_process'
|
|
get 'merge' => 'books#merge'
|
|
get 'toggle_hide' => 'books#toggle_hide'
|
|
get 'analysis'
|
|
get 'analysis_report'
|
|
get "download_excel"
|
|
end
|
|
end
|
|
|
|
resources :members do
|
|
collection do
|
|
scope '(:name-:uid)' do
|
|
resources :books do
|
|
collection do
|
|
get 'frontend_setting' => 'books#frontend_setting'
|
|
post 'update_frontend_setting' => 'books#update_frontend_setting'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
resources :book_author_types
|
|
resources :book_types
|
|
resources :book_intros
|
|
end
|
|
get "/xhr/personal_book/get_fields_for_index" => "personal_books#get_fields_for_index"
|
|
post "/xhr/personal_book/save_index_fields" => "personal_books#save_index_fields"
|
|
end
|
|
end
|