Do not add a locale parameter when not needed

This commit is contained in:
Petko Bordjukov 2014-09-01 12:56:33 +03:00
parent f3b105c4ea
commit a4972b450b
1 changed files with 5 additions and 1 deletions

View File

@ -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={})
{locale: I18n.locale} if params[:locale]
{locale: I18n.locale}
else
{}
end
end end
private private