Skip to content

Instantly share code, notes, and snippets.

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 bhauman/43079 to your computer and use it in GitHub Desktop.
Save bhauman/43079 to your computer and use it in GitHub Desktop.
module ApplicationHelper
def body_tag_class(more_class = "")
"#{params[:controller]}_cont #{params[:action]}_action #{'logged_in' if logged_in?} #{more_class}"
end
end
#usage
%html
%body{:class => open_body_tag}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment