Sha256: 45b07b6c260e426a57867d16b890a2b801cfc8203136294f756525ead93ae463

Contents?: true

Size: 822 Bytes

Versions: 36

Compression:

Stored size: 822 Bytes

Contents

# frozen_string_literal: true

class Tramway::Event::ParticipantFormFieldDecorator < ::Tramway::Core::ApplicationDecorator
  class << self
    def collections
      [:all]
    end

    def list_attributes
      [:event_title]
    end

    def show_attributes
      %i[id title description field_type event_title state created_at updated_at options position]
    end
  end

  delegate :description, to: :object
  delegate :options, to: :object
  delegate :position, to: :object

  def title
    "#{object.title} #{object.event.title}"
  end

  def event_title
    object.event.title
  end

  def field_type
    enumerize_view object.field_type
  end

  def state
    state_machine_view object, :state
  end

  def created_at
    date_view object.created_at
  end

  def updated_at
    date_view object.updated_at
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
tramway-event-1.11.4 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.11.2.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.11.2 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.11.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.11.0.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.11 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.10.2 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.10.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.10.0.2 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.10.0.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.10 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.31.2 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.31.1 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.31 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.30 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.29 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.28.4 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.28.3 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.28.2 app/decorators/tramway/event/participant_form_field_decorator.rb
tramway-event-1.9.28.1 app/decorators/tramway/event/participant_form_field_decorator.rb