2014-06-04 09:38:58 +00:00
|
|
|
Rails.application.routes.draw do
|
2014-07-03 07:48:28 +00:00
|
|
|
|
2014-06-04 09:38:58 +00:00
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
2014-07-03 07:48:28 +00:00
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
2014-06-04 09:38:58 +00:00
|
|
|
namespace :admin do
|
2014-07-03 07:48:28 +00:00
|
|
|
match 'book_setting' => "books#book_setting" ,as: :book_setting, via: [:get]
|
|
|
|
resources :books do
|
|
|
|
collection do
|
|
|
|
get 'delete'
|
|
|
|
get 'data_share'
|
|
|
|
end
|
|
|
|
match "add_author_type" => "books#add_author_type" ,as: :add_author_type, via: [:get, :post]
|
|
|
|
match "edit_author_type" => "books#edit_author_type" ,as: :edit_author_type, via: [:get, :post]
|
|
|
|
match "add_book_type" => "books#add_book_type" ,as: :add_book_type, via: [:get, :post]
|
|
|
|
match "edit_book_type" => "books#edit_book_type" ,as: :edit_book_type, via: [:get, :post]
|
|
|
|
end
|
|
|
|
resources :book_author_types
|
|
|
|
resources :book_types
|
|
|
|
resources :book_intros
|
2014-06-04 09:38:58 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|