tramway-event 1.9.27.1 → 1.9.27.6

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: 239e3ac28e3f32df2fa85cb6a245b42d482a353ba98ef1a4229820414f79681c
4
- data.tar.gz: a5b78651c18e57179fa3777002c562b7e34df12e8ce50a7d576472f03cc7dd63
3
+ metadata.gz: 241c264a182d5ca87776f79cc40d2377b152cd8c518d881ecfa1bac2b9f85a50
4
+ data.tar.gz: 7e6c0ffa780c771a29310bc6a9e0a9266d7c324098c40a571c7f76874a438227
5
5
  SHA512:
6
- metadata.gz: 2a68fc9b0b98670ea2c4f8afab3e53ea55cc45cf0ccba48085dce06285fd3bfd85a8d1a332c33021ec0bb9e8f3b7a67ca6a561a458725848bc43538ac677a204
7
- data.tar.gz: 916d2f6349c945085ec32d6219f73c04d8080a87778d120572a1262815b2a6a46e4092cab6f5feef87019b8482f3151288558aef3f69098ce58d5fa1a2a8b786
6
+ metadata.gz: 8769df93fe84e0cbfc9214bc5a8b137027ad998918dafa0bb74f4834b0e365730e37f3973a9525934e309382854e3a0de7e4ffd0952985309d26cf2ae4d5d5be
7
+ data.tar.gz: eece803bfc35d6ab469df22309503ad4838247ec0669bc52e247eee9a5503bdd6ff06dc92731a93545db6c7560b70e9939848813af7c63ab3fc67794379a6da8
data/README.md CHANGED
@@ -27,6 +27,13 @@ rails db:migrate
27
27
 
28
28
  #### 4. Then make `tramway-landing` installation. [How-to](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/README.md#installation)
29
29
 
30
+ Versions table
31
+
32
+ | tramway-event | tramway-landing |
33
+ | ------------- | --------------- |
34
+ | < 1.9.27.1 | 1.x |
35
+ | >= 1.9.27.2 | 2.x |
36
+
30
37
  #### 5. Add events to admin panel
31
38
 
32
39
  *config/initializers/tramway.rb*
@@ -41,6 +48,13 @@ Tramway::Admin.set_available_models ::Tramway::Event::Event, ::Tramway::Event::P
41
48
  mount Tramway::Event::Engine, at: '/'
42
49
  ```
43
50
 
51
+ ## How-to
52
+
53
+ ### Create event
54
+
55
+ English docs coming soon...
56
+ [На русском](https://github.com/ulmic/tramway-dev/tree/develop/tramway-event/docs/russian)
57
+
44
58
  ## Contributing
45
59
  Contribution directions go here.
46
60
 
@@ -44,7 +44,7 @@ class Tramway::Event::ParticipantDecorator < ::Tramway::Core::ApplicationDecorat
44
44
  object.event.title
45
45
  end)
46
46
  end)
47
- object.event.participant_form_fields.map do |field|
47
+ object.event.participant_form_fields.active.map do |field|
48
48
  hash = if field.options.is_a?(Hash)
49
49
  field.options
50
50
  else
@@ -11,8 +11,8 @@ class Tramway::Event::ParticipantForm < ::Tramway::Core::ApplicationForm
11
11
  ::Tramway::Event::ParticipantExtendedFormCreator.create_form_class(
12
12
  SecureRandom.hex,
13
13
  object.event,
14
+ participation_state_event: :default,
14
15
  comment: :string,
15
- participation_state_event: :string
16
16
  ).new object
17
17
  else
18
18
  super(object).tap do |obj|
@@ -13,7 +13,7 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
13
13
 
14
14
  enumerize :status, default: :common, in: %i[common main]
15
15
 
16
- scope :main_event, -> { where(status: :main) }
16
+ scope :main_event, -> { active.where(status: :main) }
17
17
  scope :actual, -> { where 'end_date > ?', DateTime.now }
18
18
  scope :past, -> { where 'end_date < ?', DateTime.now }
19
19
 
@@ -1,7 +1,5 @@
1
1
  - content_for :title do
2
2
  = @event.title
3
- - content_for :head_content do
4
- = javascript_include_tag 'tramway/event/application'
5
3
  - content_for :footer_links do
6
4
  %ul
7
5
  - @events.each do |event|
@@ -11,3 +11,7 @@
11
11
  ::Tramway::Admin.set_notificable_queries new_participants: lambda { |current_user|
12
12
  ::Tramway::Event::Participant.active.where(participation_state: :requested).send "#{current_user.role}_scope", current_user.id
13
13
  }
14
+
15
+ ::Tramway::Landing.head_content = lambda do
16
+ javascript_include_tag 'tramway/event/application'
17
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.9.27.1'
5
+ VERSION = '1.9.27.6'
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.9.27.1
4
+ version: 1.9.27.6
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-01-29 00:00:00.000000000 Z
11
+ date: 2020-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email: