From: Anton Khorev Date: Sat, 4 Jan 2025 10:23:22 +0000 (+0300) Subject: Remove slashes from body css classes X-Git-Tag: live~19^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/44843c1dd7921b310be264bc0261b3c070d37641 Remove slashes from body css classes --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fcf253289..ff6dcd2ff 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -37,7 +37,8 @@ module ApplicationHelper if content_for? :body_class content_for :body_class else - "#{params[:controller]} #{params[:controller]}-#{params[:action]}" + controller_part = params[:controller].tr("/", "-") + "#{controller_part} #{controller_part}-#{params[:action]}" end end