tramway-event 1.12.3.3 → 1.12.3.8

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: e4fe1c026aa84eda06dc4c6a326a2bb5113a91f5fde33d8f8387fd8018947988
4
- data.tar.gz: 6f9f652a73d7b168552023bce0f8db8d0da98a69e2049784eeddd4cee2784f8e
3
+ metadata.gz: 9c19a417bee52053352aba5e12c1b4e7021111e3be20ec3fccab8b3587ea476e
4
+ data.tar.gz: ef7320eed1ed631cfc09491b165059c6d0b60731342735186ada038d29ad8f31
5
5
  SHA512:
6
- metadata.gz: 1bd859ffb88da11d2ad32c85fb5486031b7582c850e90a3d5501c2f8ffe750489d7948693bfdd041f188d1c139f7482de774f38fa5c5ccaae8356325d18bd886
7
- data.tar.gz: c8296778255d09a4ceccee0baaf3b9334fde443af14956263b47ccd647e08bc6482961f8c8f2410837229910abcc3822fefa345ce8eb671e7d93c14a15b5276c
6
+ metadata.gz: dbfc98616a01483ecdf222ccb20b9d6d36262e9920e21c2ddc5fdc1a80951c229864ec2640248644d96971f8c6b822f9ddf613bd5c7f514742e8c9ca4997a4b9
7
+ data.tar.gz: c7d0d7b0e767576552dd437f5319f8eea93def57b4b74e6576ab6cbf66cb1fb82accd764da8bcea2bd7743a4201cd6e1c082e3f9322b254f7f2a6ed8510708a5
@@ -10,6 +10,10 @@ class Tramway::Event::ActionDecorator < Tramway::Core::ApplicationDecorator
10
10
  "#{object.title} - #{date_view(object.deadline)} - #{state_machine_view(object, :action_state)}"
11
11
  end
12
12
 
13
+ def title
14
+ object.title
15
+ end
16
+
13
17
  def action_state_button_color(event)
14
18
  case event
15
19
  when :do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Tramway::Event::EventLinkDecorator < ::Tramway::Landing::LinkDecorator
3
+ class Tramway::Event::EventLinkDecorator < ::Tramway::Landing::Navbar::LinkDecorator
4
4
  delegate :title, to: :object
5
5
 
6
6
  def link
@@ -8,6 +8,7 @@ module Tramway
8
8
  include ::FontAwesome5::Rails::IconHelper
9
9
  include ::Tramway::Collections::Helper
10
10
  include ::Tramway::Profiles::LinksHelper
11
+ include ::Tramway::Landing::ApplicationHelper
11
12
  end
12
13
  end
13
14
  end
@@ -7,12 +7,12 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
7
7
 
8
8
  def check_dimensions
9
9
  if photo.present?
10
- errors.add :photo, :too_small_image if photo.width < 1920 || photo.height < 1080
10
+ errors.add :photo, :too_small_image if photo.width.present? && (photo.width < 1920 || photo.height < 1080)
11
11
  end
12
12
  end
13
13
 
14
14
  has_many :participants, class_name: 'Tramway::Event::Participant'
15
- has_many :participant_form_fields, class_name: 'Tramway::Event::ParticipantFormField'
15
+ has_many :participant_form_fields, -> { order(position: :asc) }, class_name: 'Tramway::Event::ParticipantFormField'
16
16
  has_many :sections, class_name: 'Tramway::Event::Section'
17
17
  has_many :partakings, as: :part, class_name: 'Tramway::Event::Partaking'
18
18
  has_many :partnerships, class_name: 'Tramway::Partner::Partnership', as: :partner
@@ -22,7 +22,7 @@ class Tramway::Event::Event < ::Tramway::Event::ApplicationRecord
22
22
 
23
23
  enumerize :reach, default: :open, in: %i[open closed]
24
24
 
25
- scope :actual, -> { order(:begin_date).where('end_date > ?', DateTime.now) }
25
+ scope :actual, -> { where('begin_date > ?', DateTime.now).where('begin_date < ?', DateTime.now + 2.days) }
26
26
  scope :past, -> { where 'end_date < ?', DateTime.now }
27
27
  scope :open, -> { where reach: :open }
28
28
  scope :closed, -> { where reach: :closed }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Event
5
- VERSION = '1.12.3.3'
5
+ VERSION = '1.12.3.8'
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: 1.12.3.3
4
+ version: 1.12.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-02 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configus