tramway-event 1.10.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9b457ab58d100b7c2dbfdfdd14d046993697e0e03907a644ec4207d227ff2be
4
- data.tar.gz: df0413927172dd6780a9bdf1b98d82b6f1d56026b2dd3632689e026dbdf50b5f
3
+ metadata.gz: ff89bd686ac28eff732d72cd490ea1d8f252f4ac29662522bc7ef429dbacfcf2
4
+ data.tar.gz: f9b9f050ce693d5b1661a1aa3c58ef9274c3ab953c4cb051f4334201e0d6d7ac
5
5
  SHA512:
6
- metadata.gz: de7b24ca1f481e9ab6acabae301ba9a8bd650532492d494f17ae95afc3f77508689ec6a027c8dafe8a5158bcb94a1f2bdc914da9c915bcd477e29e54d79f1705
7
- data.tar.gz: '085e99b22a37570e5ff4e141e6435f7789cd60961c16ea8f6d811accf9650b5c00a5a1214e01de0c8ce1866cc05d7f0dac39a6b21b1ca9e832807da9f4aab20d'
6
+ metadata.gz: 5df609954218de5943a2cbe58a0e16545148750ea7a26378cf3ba2a817d45a3cba03a6395d967eeefc9fd6661091b421053a3d27a7fb40be1fe2fdf4d6081831
7
+ data.tar.gz: 774f46bce3e89662224fc88dba5f112aee031680fda27d670bb6e5140f74b76918938eef3f0b2a438a9782198ba38a969e928e593c239ac4f1217ba2acdf52a0
@@ -3,7 +3,7 @@
3
3
  class Tramway::Event::ParticipantXlsDecorator < Tramway::Export::Xls::ApplicationDecorator
4
4
  class << self
5
5
  def columns
6
- %i[full_name email phone organization event].map do |attribute|
6
+ %i[event].map do |attribute|
7
7
  { Tramway::Event::Participant.human_attribute_name(attribute).to_sym => attribute }
8
8
  end
9
9
  end
@@ -13,31 +13,15 @@ class Tramway::Event::ParticipantXlsDecorator < Tramway::Export::Xls::Applicatio
13
13
  end
14
14
  end
15
15
 
16
- def full_name
17
- return unless object.values
18
-
19
- "#{object.values['Фамилия'] || object.values['Фамилия ']} #{object.values['Имя'] || object.values['Имя ']}"
20
- end
21
-
22
- def email
23
- return unless object.values
24
-
25
- object.values['Email']
26
- end
27
-
28
- def phone
29
- return unless object.values
30
-
31
- object.values['Телефон']
32
- end
33
-
34
- def organization
35
- return unless object.values
36
-
37
- object.values['Место работы/ Учебное заведение']
38
- end
16
+ delegate :values, to: :object
39
17
 
40
18
  def event
41
19
  object.event.title
42
20
  end
21
+
22
+ def flexible_columns
23
+ object.values&.keys&.map do |key|
24
+ { Tramway::Event::Participant.human_attribute_name(key).to_sym => -> { values&.dig(key) } }
25
+ end
26
+ end
43
27
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.10.1'
5
+ VERSION = '1.10.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-01 00:00:00.000000000 Z
11
+ date: 2020-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configus