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 'technology_transfers_setting' => "technology_transfers#setting" resources :technology_transfers do collection do get 'toggle_hide' => 'technology_transfers#toggle_hide' get 'analysis' get 'analysis_report' get "download_excel" end end resources :members do collection do scope '(:name-:uid)' do resources :technology_transfers do collection do get 'frontend_setting' => 'technology_transfers#frontend_setting' post 'update_frontend_setting' => 'technology_transfers#update_frontend_setting' end end end end end resources :technology_transfer_categories post "technology_transfer_categories/update_order" => "technology_transfer_categories#update_order" end get "/xhr/personal_technology_transfer/get_fields_for_index" => "personal_technology_transfers#get_fields_for_index" post "/xhr/personal_technology_transfer/save_index_fields" => "personal_technology_transfers#save_index_fields" end end