Sha256: 3d66d6156a7c8bc5e310c688e658c3228ed37839dc1a26b6f84dc417a14f04e2
Contents?: true
Size: 667 Bytes
Versions: 22
Compression:
Stored size: 667 Bytes
Contents
# frozen_string_literal: true class Tramway::Event::ParticipantXlsDecorator < Tramway::Export::Xls::ApplicationDecorator class << self def columns %i[event].map do |attribute| { Tramway::Event::Participant.human_attribute_name(attribute).to_sym => attribute } end end def filename 'participants.xls' end end delegate :values, to: :object def event object.event.title end def flexible_columns object.event.participant_form_fields.active.order(position: :asc).map(&:title).map do |key| { Tramway::Event::Participant.human_attribute_name(key).to_sym => -> { values&.dig(key) } } end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
tramway-event-1.11.5.1 | app/decorators/tramway/event/participant_xls_decorator.rb |
tramway-event-1.11.5 | app/decorators/tramway/event/participant_xls_decorator.rb |