tramway-event 1.9 → 1.9.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3df1b0d7ef6fd03c69869cc2ae56bd89fd61126934eb8ea08726a675231e4dfa
|
4
|
+
data.tar.gz: e7c4951e8480719da7d7bc2442cfe8546aa6dc126b60f5cbe7479b25b81993be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e89a0960b154e3939413e1c6f8c21d5a276dc525dbb813b8fb78192760e1704d44fa1f13144a1b1e2083bf28c1d17594c6ca38fd8b3c45523af16ef4bb0cc04
|
7
|
+
data.tar.gz: 9bed6361560bba5e715fe1bc053cff3d40b6d96b9bd6903651661ff3f186bfc0988c1720f1ff6062b8c155fb0331a309dae4f852476295c2d0bf1182569ce44d
|
@@ -11,7 +11,7 @@ class Tramway::Event::EventsController < Tramway::Event::ApplicationController
|
|
11
11
|
@events = ::Tramway::Event::Event.active.actual.map { |e| ::Tramway::Event::Events::Show::EventDecorator.decorate e }
|
12
12
|
@people_as_features = @event.partakings.active.map { |p| ::Tramway::Event::PartakingFeatureDecorator.decorate p }
|
13
13
|
@partners = ::Tramway::Partner::Partnership.partnership_type.values.reduce({}) do |hash, partnership_type|
|
14
|
-
hash.merge! partnership_type => (event.send(partnership_type.to_s.pluralize).map do |partner|
|
14
|
+
hash.merge! partnership_type => (event.send(partnership_type.to_s.pluralize).active.map do |partner|
|
15
15
|
Tramway::Partner::OrganizationFeatureDecorator.decorate partner
|
16
16
|
end)
|
17
17
|
end
|
@@ -10,7 +10,7 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
|
|
10
10
|
|
11
11
|
::Tramway::Partner::Partnership.partnership_type.values.each do |partnership_type|
|
12
12
|
has_many partnership_type.pluralize.to_sym, (-> do
|
13
|
-
joins(:partnerships).where 'tramway_partner_partnerships.partnership_type = ?', partnership_type
|
13
|
+
joins(:partnerships).where 'tramway_partner_partnerships.partnership_type = ? AND tramway_partner_partnerships.state = \'active\'', partnership_type
|
14
14
|
end), foreign_key: :organization_id, source: :organization, through: :partnerships, class_name: 'Tramway::Partner::Organization'
|
15
15
|
end
|
16
16
|
|