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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc3e3f7ea09462c36274e6c058c12865de5b010605f2b5b446306f92dc1013e7
4
- data.tar.gz: bd8342d90440544a55b88db0f63f7815c275333686e8eff06c487bc72a9cbaca
3
+ metadata.gz: 1d2330e183117efbb0ead5998a63fb5ba46ca89a9a4b9ec18b4248c28adcff15
4
+ data.tar.gz: f2d8ea1db0b4a1a83d7d396f6d1c4a26554408d287bb3690b309d74e08c617e2
5
5
  SHA512:
6
- metadata.gz: c93a457bf387332c3e8439d406a83ac7b830178dd98514f562974ddcd36478bde6a7bd193edd1f85475d20dd499864b0c55c8611477dd4773adb46b31c7dd4bf
7
- data.tar.gz: 41e37164b15f123ebd3d775d79b894fe0914bfc24932c7c5b4df34221ee850a000bd7beb66f8339e3e65c9edbdeb86140d0b9cbe2db67c0d951a31a378120e92
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(Tramway::Event::Event,
5
- Tramway::Event::ParticipantFormField,
6
- Tramway::Event::Participant,
7
- Tramway::Event::Section,
8
- Tramway::Event::Person,
9
- Tramway::Event::Partaking,
10
- Tramway::Event::Place,
11
- Tramway::Event::Action,
12
- project: :event)
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
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '2.0.0.1'
5
+ VERSION = '2.0.1'
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: 2.0.0.1
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-01-30 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tramway