Skip to content

Instantly share code, notes, and snippets.

@dpowell
Created October 30, 2011 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpowell/1326610 to your computer and use it in GitHub Desktop.
Save dpowell/1326610 to your computer and use it in GitHub Desktop.
BodyClassHelper
module BodyClassHelper
def body_class
qualified_controller_name = controller.controller_path.gsub('/','-')
"#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment