Sha256: 5b136ef3b91d1acf8481f79c49b4b828410605fb0ec09c4b7ca7d658a102645b
Contents?: true
Size: 352 Bytes
Versions: 10
Compression:
Stored size: 352 Bytes
Contents
module Georgia module StatesHelper def state_label_tag state content_tag(:span, state.try(:humanize), class: "label label-#{css_class(state)}") end def css_class state, options={} case state when 'draft' then 'warning' when 'pending' then 'info' when 'published' then 'success' end end end end
Version data entries
10 entries across 10 versions & 1 rubygems