app/models/tramway/page/page.rb in tramway-page-1.5.2.3 vs app/models/tramway/page/page.rb in tramway-page-1.5.3

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true class Tramway::Page::Page < ::Tramway::Core::ApplicationRecord - has_many :blocks, class_name: 'Tramway::Landing::Block' + has_many :blocks, -> { order(position: :asc) }, class_name: 'Tramway::Landing::Block' enumerize :page_type, in: %i[main other], default: :other scope :landings, -> { where page_type: :landing } scope :published, -> { where view_state: :published }