tramway-event 1.12.3.4 → 1.12.3.9

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: 6c1ada06651814637cc6554ec7c936bed5bcac349aa69aa9c93df3748088e311
4
- data.tar.gz: '008bd950893f2d754a5331a5dd41ba2e50f4c2ffd4f7e3e5e9924e1caa536afb'
3
+ metadata.gz: d16cb62030954f34b751e718ea4c6d9e6f674a9a5f819f2f77c72352e23a5522
4
+ data.tar.gz: 3fce7c42f43263082bf4076dd5e0a4eaadbe252e1be83d481611e765b4276ab1
5
5
  SHA512:
6
- metadata.gz: 90a7c1ce458054d2b8693caa160f4a2f339687f4b07d82de0b23908610ab53b55701fcf67e0697e083cd3dbf252e70bdeb5146fa7fa25c0b3a0e54a30766e6c7
7
- data.tar.gz: 41ea934bf3dd57d87c18ba3a579a77ab341d265784710cbe65f228d98a4543d7ac250497e9376cf9620ff8b308067cdbe59bd906b8e07c14238891061cecb82f
6
+ metadata.gz: be1c3f5817c1920b5d455d0ba2d6b583d79fc0edd29d80d738c053df40cb474916f08a9075ab0d1ab11b1da5a8ef50c3103a8213eb6b6a20ecf0cf166c7b8849
7
+ data.tar.gz: 8954b357e87e8035a1b6722696529993b52531088a74a42f160d190b7db78f2b94b2a1df811d07192462f0b98e1119590b19f660da1d1851f023258cb7674fbd
@@ -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
@@ -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 + 11.days).order(begin_date: :asc) }
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.4'
5
+ VERSION = '1.12.3.9'
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.4
4
+ version: 1.12.3.9
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-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configus