personal-journal/config/routes.rb

25 lines
1.2 KiB
Ruby
Raw Normal View History

2014-06-04 03:55:13 +00:00
Rails.application.routes.draw do
2014-06-25 05:26:03 +00:00
2014-06-04 03:55:13 +00:00
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
2014-06-12 10:27:26 +00:00
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
2014-06-04 03:55:13 +00:00
end
end
end