Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add body class helper

  • Loading branch information...
commit 53d093b4a6f003d0d039a80c617fe2dd1242727b 1 parent 26896b2
@mjankowski mjankowski authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 app/helpers/body_class_helper.rb
View
6 app/helpers/body_class_helper.rb
@@ -0,0 +1,6 @@
+module BodyClassHelper
+ def body_class
+ qualified_controller_name = controller.controller_path.gsub('/','-')
+ "#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.