Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Created June 22, 2013 12:20
Show Gist options
  • Select an option

  • Save adamdilek/5840690 to your computer and use it in GitHub Desktop.

Select an option

Save adamdilek/5840690 to your computer and use it in GitHub Desktop.
module ApplicationHelper
def format_state(state, large = false)
capture_haml do
css_classes = %w(label)
css_classes << state
css_classes << 'large' if large
haml_tag :span, class: css_classes do
haml_concat t("helpers.state.#{state}")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment