Do not add a locale parameter when not needed
This commit is contained in:
parent
f3b105c4ea
commit
a4972b450b
|
@ -6,7 +6,11 @@ class ApplicationController < ActionController::Base
|
||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
|
|
||||||
def default_url_options(options={})
|
def default_url_options(options={})
|
||||||
|
if params[:locale]
|
||||||
{locale: I18n.locale}
|
{locale: I18n.locale}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue