Skip to content

Instantly share code, notes, and snippets.

@samrayner
Created April 29, 2016 10:52
Show Gist options
  • Save samrayner/7f6279886878b5fdbfa845f14a3cd40f to your computer and use it in GitHub Desktop.
Save samrayner/7f6279886878b5fdbfa845f14a3cd40f to your computer and use it in GitHub Desktop.
def bool_label(toggle)
if toggle
content_tag(:span, defined?(icon) ? icon('check') : 'Yes', class: 'label label-success')
else
content_tag(:span, defined?(icon) ? icon('times') : 'No', class: 'label label-default')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment