Sha256: d448afdf51b4d245d962f8535c808218d6d4cc7c8ae87dfbbbcd8b33fe34ab27
Contents?: true
Size: 564 Bytes
Versions: 18
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true class Tramway::Event::ActionDecorator < Tramway::Core::ApplicationDecorator class << self delegate :human_action_state_event_name, to: :model_class delegate :human_attribute_name, to: :model_class end def name "#{object.title} - #{date_view(object.deadline)} - #{state_machine_view(object, :action_state)}" end def title object.title end def action_state_button_color(event) case event when :do :success when :decline :danger when :return :warning end end end
Version data entries
18 entries across 18 versions & 1 rubygems