app/models/tramway/page/page.rb in tramway-page-1.6.0.1 vs app/models/tramway/page/page.rb in tramway-page-1.6.0.2
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-class Tramway::Page::Page < ::Tramway::ApplicationRecord
+class Tramway::Page::Page < Tramway::ApplicationRecord
has_many :blocks, -> { order(position: :asc) }, class_name: 'Tramway::Landing::Block'
enumerize :page_type, in: %i[main other without_layout], default: :other
scope :landings, -> { where page_type: :landing }
@@ -17,7 +17,11 @@
end
event :hide do
transitions from: :published, to: :unpublished
end
+ end
+
+ aasm do
+ state :hack
end
end