tramway-event 2.0.0.1 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/tramway/event/participant.rb +4 -0
- data/config/initializers/tramway.rb +13 -9
- data/lib/tramway/event/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d2330e183117efbb0ead5998a63fb5ba46ca89a9a4b9ec18b4248c28adcff15
|
4
|
+
data.tar.gz: f2d8ea1db0b4a1a83d7d396f6d1c4a26554408d287bb3690b309d74e08c617e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298c9914f04412fbc04cb5f004cc196f927fc5e07a964b88c4d254d9d6380ad52bb8b5da18e620b49298b00c8b20870e7ee7623632217a525f27a602b2fcc04a
|
7
|
+
data.tar.gz: bc400150dbefb13d06132aba26055e06e16a38f3b4d1c45cf791f3d566fab8e7b9ffc72863e339536e1bdd73de1154e6e5de5a8a8b50d089eef366eac8604726
|
@@ -3,6 +3,10 @@
|
|
3
3
|
class Tramway::Event::Participant < ::Tramway::ApplicationRecord
|
4
4
|
belongs_to :event, class_name: 'Tramway::Event::Event'
|
5
5
|
|
6
|
+
def self.ransackable_attributes(auth_object = nil)
|
7
|
+
["event_id"]
|
8
|
+
end
|
9
|
+
|
6
10
|
aasm :participation_state, column: :participation_state do
|
7
11
|
state :requested, initial: true
|
8
12
|
state :prev_approved
|
@@ -1,15 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Rails.application.config.after_initialize do
|
4
|
-
Tramway.set_available_models(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
Tramway.set_available_models(
|
5
|
+
[
|
6
|
+
Tramway::Event::Event,
|
7
|
+
Tramway::Event::ParticipantFormField,
|
8
|
+
Tramway::Event::Participant,
|
9
|
+
Tramway::Event::Section,
|
10
|
+
Tramway::Event::Person,
|
11
|
+
Tramway::Event::Partaking,
|
12
|
+
Tramway::Event::Place,
|
13
|
+
Tramway::Event::Action
|
14
|
+
],
|
15
|
+
project: :event
|
16
|
+
)
|
13
17
|
Tramway.set_notificable_queries new_participants: lambda { |current_user|
|
14
18
|
Tramway::Event::Participant.where(participation_state: :requested).send "#{current_user.role}_scope", current_user.id
|
15
19
|
}
|
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: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tramway
|