tramway-page 1.5.3.4 → 1.5.3.6

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: 597d7b82b9a142d39de22114e710dcbda2df5f3854aef0d489bd3b5053b971fa
4
- data.tar.gz: dc0d709e0cb0a326ec3dbd1a8c16f00c6c95f8ee53a4199034bf5106c3e7ddc9
3
+ metadata.gz: 49204322a51415a011eb1b3d00b961a7a15d311d616b990fce00b79a69481f65
4
+ data.tar.gz: 3e1d76aba7b767e30bfb97946aacf12d5a3a0073464985cbd49218d26fd263cc
5
5
  SHA512:
6
- metadata.gz: 685464ba40427820743885e46636ad309305e5ecba419051f914475a905cd384829c76f2620a6418eb4ddb5e60760487d5ecfb52adf2f5feb8d9fc8f1c1d2b43
7
- data.tar.gz: 9aefd9d322d53e253d8018d6d8bbb416eed6bac01aece0891ee9daa77f72ec25095f68591141c385d54bf4f289ae7f6d744fb87c057c57b917d1c136f5f74ecc
6
+ metadata.gz: 37f9ed46eaa921e320c87b267509aab72a9fb89a793b36c70f133b0f85de2e705169f211dcdba40ba39ba689c6a6e5eda925b20652cc3e608cbb3e7512ccf498
7
+ data.tar.gz: 60c10b89a2f315d4695be2849ea467bc29f514a2008e5c7611f99b9a175383a9426083d2b12877c723cf9299cf3952069542ad4ea1d56b2402e1cb9a1a708064
@@ -4,7 +4,7 @@ class ::Tramway::Page::PagesController < ::Tramway::Page::ApplicationController
4
4
  layout 'tramway/landing/application'
5
5
 
6
6
  def show
7
- @application = ::Tramway::Core.application_object # FIXME need to be in the Tramway::Core::ApplicationController
7
+ @application = ::Tramway::Core.application_object # FIXME: need to be in the Tramway::Core::ApplicationController
8
8
  @page = ::Tramway::Page::Page.published.find_by slug: params[:slug]
9
9
  @blocks = @page.blocks.published.active.map do |block|
10
10
  if block.block_type.header_with_form? && block.form_url.present?
@@ -8,16 +8,16 @@ class Tramway::Page::Page < ::Tramway::Core::ApplicationRecord
8
8
  scope :landings, -> { where page_type: :landing }
9
9
  scope :published, -> { where view_state: :published }
10
10
 
11
- state_machine :view_state, initial: :unpublished do
12
- state :unpublished
11
+ aasm :view_state, column: :view_state do
12
+ state :unpublished, initial: true
13
13
  state :published
14
14
 
15
15
  event :publish do
16
- transition unpublished: :published
16
+ transitions from: :unpublished, to: :published
17
17
  end
18
18
 
19
19
  event :hide do
20
- transition published: :unpublished
20
+ transitions from: :published, to: :unpublished
21
21
  end
22
22
  end
23
23
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Page
5
- VERSION = '1.5.3.4'
5
+ VERSION = '1.5.3.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-page
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3.4
4
+ version: 1.5.3.6
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-06-23 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Description of Tramway::Page.
14
14
  email: