Created
June 22, 2013 12:20
-
-
Save adamdilek/5840690 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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