]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Remove slashes from body css classes
[rails.git] / app / helpers / application_helper.rb
index fcf253289ea45ff65e11f0f30c5909146bfa1f10..ff6dcd2ff194820556e8a85382f97677ddd97d30 100644 (file)
@@ -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