personal-book/config/routes.rb

31 lines
829 B
Ruby

Rails.application.routes.draw do
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
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
end
end
end