Skip to content

Instantly share code, notes, and snippets.

@ltackett
Created September 2, 2010 20:08
Show Gist options
  • Select an option

  • Save ltackett/562855 to your computer and use it in GitHub Desktop.

Select an option

Save ltackett/562855 to your computer and use it in GitHub Desktop.
def body_class
class_names.join(" ")
end
def body_class_current_page
current_page.gsub("/", "").gsub(".html", "")
end
def class_names
body_class = [body_class_current_page]
body_class << (@body_class unless @body_class.nil?)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment