13 lines
No EOL
473 B
Ruby
13 lines
No EOL
473 B
Ruby
Rails.application.routes.draw do
|
|
scope "/:locale", locale: /#{I18n.available_locales.join("|")}/ do
|
|
resources :users
|
|
post "/users/:id/edit", to: "users#validate_key", as: "validate_user"
|
|
root to: "pages#home"
|
|
end
|
|
|
|
root to: redirect("/#{I18n.default_locale}", status: 302), as: :redirected_root
|
|
get "/*path",
|
|
to: redirect("/#{I18n.default_locale}/%{path}", status: 302),
|
|
constraints: {path: /(?!(#{I18n.available_locales.join("|")})\/).*/},
|
|
format: false
|
|
end |