Module: Alchemy::LocaleRedirects

Extended by:
ActiveSupport::Concern
Included in:
PagesController
Defined in:
app/controllers/concerns/alchemy/locale_redirects.rb

Overview

Handles locale redirects

If the current URL has a locale prefix, but should not have one it redirects to url without locale prefix.

Situations we don't want a locale prefix:

  1. If only one language is published

  2. If the requested locale is the current default locale