Module: Perilune::ApplicationHelper
- Defined in:
- app/helpers/perilune/application_helper.rb
Instance Method Summary collapse
-
#task_state(task) ⇒ Object
rubocop:disable Metrics/MethodLength.
Instance Method Details
#task_state(task) ⇒ Object
rubocop:disable Metrics/MethodLength
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/perilune/application_helper.rb', line 5 def task_state(task) # rubocop:disable Metrics/MethodLength case task.state.to_sym when :draft content_tag(:div, task.state, class: 'inline-flex items-center px-2.5 py-0.5 rounded-sm text-sm font-medium uppercase bg-gray-500 text-gray-50') # rubocop:disable Layout/LineLength when :uploaded content_tag(:div, task.state, class: 'inline-flex items-center px-2.5 py-0.5 rounded-sm text-sm font-medium uppercase bg-yellow-500 text-yellow-50') # rubocop:disable Layout/LineLength when :processed content_tag(:div, task.state, class: 'inline-flex items-center px-2.5 py-0.5 rounded-sm text-sm font-medium uppercase bg-blue-500 text-blue-50') # rubocop:disable Layout/LineLength when :failed content_tag(:div, task.state, class: 'inline-flex items-center px-2.5 py-0.5 rounded-sm text-sm font-medium uppercase bg-red-500 text-red-50') # rubocop:disable Layout/LineLength end end |