X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ad4ab4603b27f2e89e4bb4a709bc04a6685ba67b..989b110bfc804e2c681b12523f20940af205680d:/app/helpers/application_helper.rb?ds=inline diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fcf253289..86a3d56cd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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