personal-journal/config/routes.rb

28 lines
1.2 KiB
Ruby

Rails.application.routes.draw do
# get 'journal_papers/index'
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
match 'writing_journal_setting' => "journal_papers#writing_journal_setting" ,as: :writing_journal_setting, via: [:get]
resources :journal_papers do
collection do
get 'delete'
get 'data_share'
end
match "add_level" => "journal_papers#add_level" ,as: :add_level, via: [:get, :post]
match "edit_level" => "journal_papers#edit_level" ,as: :edit_level, via: [:get, :post]
match "add_author_type" => "journal_papers#add_author_type" ,as: :add_author_type, via: [:get, :post]
match "edit_author_type" => "journal_papers#edit_author_type" ,as: :edit_author_type, via: [:get, :post]
match "add_paper_type" => "journal_papers#add_paper_type" ,as: :add_paper_type, via: [:get, :post]
match "edit_paper_type" => "journal_papers#edit_paper_type" ,as: :edit_paper_type, via: [:get, :post]
end
resources :journal_levels
resources :journal_paper_author_types
resources :journal_paper_types
resources :journal_paper_intros
end
end
end