Module: Georgia::StatesHelper
- Defined in:
- app/helpers/georgia/states_helper.rb
Instance Method Summary collapse
Instance Method Details
#css_class(state, options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/helpers/georgia/states_helper.rb', line 8 def css_class state, ={} case state when 'draft' then 'warning' when 'pending' then 'info' when 'published' then 'success' end end |
#state_label_tag(state) ⇒ Object
4 5 6 |
# File 'app/helpers/georgia/states_helper.rb', line 4 def state_label_tag state content_tag(:span, state.try(:humanize), class: "label label-#{css_class(state)}") end |