]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Center secondary nav
[rails.git] / app / helpers / application_helper.rb
index fcf253289ea45ff65e11f0f30c5909146bfa1f10..86a3d56cdb96c2df8d8cf6c45e71a839c5a165c6 100644 (file)
@@ -37,12 +37,13 @@ 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
 
   def header_nav_link_class(path)
-    ["nav-link", current_page?(path) ? "text-secondary-emphasis" : "text-secondary"]
+    ["nav-link", current_page?(path) ? "active text-secondary-emphasis" : "text-secondary"]
   end
 
   def application_data