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 resources :pseudo_members do collection do get "settings" end member do patch "update_settings" end end end scope "pseudo_users" do post "/loginpseudouser", to: "pseudo_members#loginuser" get "/logoutpseudouser", to: "pseudo_members#logoutuser", as: "member_logout" post "/register_pseudo_user", to: "pseudo_members#register_user", as: "register_pseudo_user" post "/forgot_pseudo_user", to: "pseudo_members#forgot_pseudo_user", as: "forgot_pseudo_user" patch "/update_pseudo_user", to: "pseudo_members#update_pseudo_user", as: "update_pseudo_user" end end end