]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/application_helper.rb
Move search form to header on small screens
[rails.git] / app / helpers / application_helper.rb
index f74d5cbf294722cf86243874331b0db8aa6fb823..5d61e8c6306caca559fe6c95c4eef180dbf826e3 100644 (file)
@@ -94,7 +94,11 @@ 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)