X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ae0177fbe61d7d02e3c6b441bd395fff6fd96a18..a997690897b765ec763631c31b9e4ca87b4e530f:/app/helpers/application_helper.rb?ds=sidebyside diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4765cb35b..5d61e8c63 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -94,6 +94,14 @@ module ApplicationHelper end def body_class - [params[:controller], "#{params[:controller]}-#{params[:action]}", @extra_body_class].compact.join(" ") + if content_for? :body_class + content_for :body_class + else + "#{params[:controller]} #{params[:controller]}-#{params[:action]}" + end + end + + def current_page_class(path) + :current if current_page?(path) end end