app/controllers/tramway/event/events_controller.rb in tramway-event-1.9.19.6 vs app/controllers/tramway/event/events_controller.rb in tramway-event-1.9.19.7

- old
+ new

@@ -10,12 +10,14 @@ @sections_as_features = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s } @sections = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s } @footer = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.footer @events = ::Tramway::Event::Event.active.actual.map { |e| ::Tramway::Event::Events::Show::EventDecorator.decorate e } @people_as_features = @event.partakings.active.map { |p| ::Tramway::Event::PartakingFeatureDecorator.decorate p } - @partners = ::Tramway::Partner::Partnership.partnership_type.values.reduce({}) do |hash, partnership_type| - hash.merge! partnership_type => (event.send(partnership_type.to_s.pluralize).active.map do |partner| - Tramway::Partner::OrganizationFeatureDecorator.decorate partner - end) + if defined?(::Tramway::Partner) + @partners = ::Tramway::Partner::Partnership.partnership_type.values.reduce({}) do |hash, partnership_type| + hash.merge! partnership_type => (event.send(partnership_type.to_s.pluralize).active.map do |partner| + Tramway::Partner::OrganizationFeatureDecorator.decorate partner + end) + end end end end