Sha256: 4741554c7fe90bbdb1b8cd90bf59483389a8dcec12b46a961fe8d1b288b03512
Contents?: true
Size: 780 Bytes
Versions: 6
Compression:
Stored size: 780 Bytes
Contents
class Tramway::Event::ParticipantXlsxDecorator < Tramway::Export::Xlsx::ApplicationDecorator class << self def columns [ :full_name, :email, :phone, :organization, :event ].map do |attribute| { Tramway::Event::Participant.human_attribute_name(attribute).to_sym => attribute } end end def filename 'participants.xlsx' end end def full_name "#{object.values['Фамилия'] || object.values['Фамилия ']} #{object.values['Имя'] || object.values['Имя ']}" end def email object.values['Email'] end def phone object.values['Телефон'] end def organization object.values['Место работы/ Учебное заведение'] end def event object.event.title end end
Version data entries
6 entries across 6 versions & 1 rubygems