Skip to content

Instantly share code, notes, and snippets.

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