2014-06-04 09:38:58 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
2015-01-09 07:38:49 +00:00
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
2014-06-04 09:38:58 +00:00
|
|
|
namespace :admin do
|
2015-01-09 07:38:49 +00:00
|
|
|
get 'book_setting' => "books#setting"
|
|
|
|
|
|
|
|
resources :books do
|
|
|
|
collection do
|
|
|
|
get 'toggle_hide' => 'books#toggle_hide'
|
|
|
|
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
|
2014-06-04 09:38:58 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|