Module: Crm::ShowcasesHelper

Defined in:
app/helpers/crm/showcases_helper.rb

Overview

View helper: showcases.

Instance Method Summary collapse

Instance Method Details

#showcase_state_badge(state) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/helpers/crm/showcases_helper.rb', line 4

def showcase_state_badge(state)
  color = case state
          when 'published' then 'success'
          when 'draft' then 'warning'
          else 'secondary'
          end
   :span, state.to_s.humanize, class: "badge bg-#{color}"
end