personal-journal/config/routes.rb

40 lines
1.7 KiB
Ruby
Raw Normal View History

2014-06-04 03:55:13 +00:00
Rails.application.routes.draw do
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
2014-08-11 11:16:52 +00:00
resources :members do
collection do
scope '(:name-:uid)' do
resources :journal_papers do
collection do
get 'frontend_setting' => 'journal_papers#frontend_setting'
post 'update_frontend_setting' => 'journal_papers#update_frontend_setting'
end
end
end
end
end
2014-06-12 10:27:26 +00:00
resources :journal_levels
resources :journal_paper_author_types
resources :journal_paper_types
2014-06-25 13:43:04 +00:00
resources :journal_paper_intros
2014-06-04 03:55:13 +00:00
end
end
end