tramway-event 1.8.4 → 1.8.5

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: 640fb69ee78f8db21a877ab541641056dd50449aa1da402bf96f9ebb8bc65aab
4
- data.tar.gz: 9eb469eaa6743015ed38e156c3722d1f234777d9ea572a0d577ba530b3e24254
3
+ metadata.gz: f9c12311266981956a6e8355441fb61879ba70c7b5e6774a4600a0eb75fdf211
4
+ data.tar.gz: 4558ad858d3a78536f7796c2589c3afce4caf114785229c8731492ed802e24f2
5
5
  SHA512:
6
- metadata.gz: d630455419b567ba90f37be955dbd296f8f846da5896db29d53d13edc109e50b8d11b28cc383570889f739d45c7d44f7919a76688a95efa9dab672224f32a536
7
- data.tar.gz: 036f4a1b7a22d7f86a538fc2ebca72a1841195cd98c546d3947ebbde30960f9ee5563f1488c48de8ec80818d2ba29c06ce178b9fe97d7a4dd9b503d29094774a
6
+ metadata.gz: 6b2dbb00d0d4d9e4e833beb07ec567dda071d4e8a56e7827a6b2aaed0af56fe7209213a78acd016879425c6feda122db83c2cb0b4a3ab03cbfa09db3df971881
7
+ data.tar.gz: 42531af6a0ccba9f079616b5d2d5117da0ed3beadc2c03ec4a465739be76e0343bbb4dde357ad52381ffe9a66e4a3c2f5eb9b38007cce6922a774aa64bc08692
@@ -7,7 +7,7 @@ class Tramway::Event::EventsController < Tramway::Event::ApplicationController
7
7
  @sections_as_features = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s }
8
8
  @sections = @event.sections.active.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s }
9
9
  @footer = ::Tramway::Landing::BlockDecorator.decorate ::Tramway::Landing::Block.footer
10
- @events = ::Tramway::Event::Event.active.map { |e| ::Tramway::Event::Events::Show::EventDecorator.decorate e }
10
+ @events = ::Tramway::Event::Event.active.actual.map { |e| ::Tramway::Event::Events::Show::EventDecorator.decorate e }
11
11
  @people_as_features = @event.partakings.active.map { |p| ::Tramway::Event::PartakingFeatureDecorator.decorate p }
12
12
  end
13
13
  end
@@ -9,6 +9,7 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
9
9
  enumerize :status, default: :common, in: [ :common, :main ]
10
10
 
11
11
  scope :main_event, -> { where(status: :main) }
12
+ scope :actual, -> { where 'end_date > ?', DateTime.now }
12
13
 
13
14
  def request_collecting_state
14
15
  return :not_initialized unless request_collecting_begin_date.present? || request_collecting_end_date.present?
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Event
3
- VERSION = '1.8.4'
3
+ VERSION = '1.8.5'
4
4
  end
5
5
  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.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-21 00:00:00.000000000 Z
11
+ date: 2018-10-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails engine for events
14
14
  email: