Skip to content
Browse files

add body class helper

  • Loading branch information...
1 parent 26896b2 commit 53d093b4a6f003d0d039a80c617fe2dd1242727b @mjankowski mjankowski committed
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

0 comments on commit 53d093b

Please sign in to comment.
Something went wrong with that request. Please try again.