app/controllers/concerns/enjoy/localizeable.rb in enjoy_cms-0.3.7.1 vs app/controllers/concerns/enjoy/localizeable.rb in enjoy_cms-0.3.7.2

- old
+ new

@@ -37,10 +37,10 @@ end else _url = item.redirect.blank? ? item.fullpath : item.redirect end _localizable_regexp = Regexp.new("^(#{I18n.available_locales.map { |l| "\\/#{l}"}.join("|")})") - ((params[:locale].blank? or _url != _localizable_regexp) ? "" : "/#{params[:locale]}") + _url + ((params[:locale].blank? or _url =~ _localizable_regexp) ? "" : "/#{params[:locale]}") + _url end def find_seo_extra(path) _localizable_regexp = Regexp.new("^(#{I18n.available_locales.map { |l| "\\/#{l}"}.join("|")})") _path = path.sub(_localizable_regexp, "") if _path[0] != '/'