DEV: Fix another frozen string error.

This commit is contained in:
Guo Xiang Tan
2019-05-17 10:07:18 +08:00
parent 96fbc14f80
commit e2444e0d31
3 changed files with 22 additions and 4 deletions

View File

@@ -775,8 +775,7 @@ class ApplicationController < ActionController::Base
end
@container_class = "wrap not-found-container"
@slug = params[:slug].presence || params[:id].presence || ""
@slug.tr!('-', ' ')
@slug = (params[:slug].presence || params[:id].presence || "").tr('-', '')
@hide_search = true if SiteSetting.login_required
render_to_string status: status, layout: layout, formats: [:html], template: '/exceptions/not_found'
end