app/models/tramway/landing/block.rb in tramway-landing-3.0.3 vs app/models/tramway/landing/block.rb in tramway-landing-3.1

- old
+ new

@@ -1,9 +1,10 @@ # frozen_string_literal: true class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord belongs_to :page, class_name: 'Tramway::Page::Page' + has_many :forms, -> { order(position: :asc) }, class_name: 'Tramway::Landing::Form' enumerize :block_type, in: %i[header header_with_form footer page cards features contacts link page_with_button just_text view] enumerize :navbar_link, in: %i[exist not_exist], default: :not_exist enumerize :link_object_type, in: ['Tramway::SportSchool::Document', 'Tramway::Page::Page'] @@ -20,10 +21,9 @@ event :hide do transition published: :hidden end end - store_accessor :values, :form_url store_accessor :button, :button_link store_accessor :button, :button_title scope :on_main_page, lambda { active.joins(:page).where(view_state: :published).where('tramway_page_pages.page_type = ?', :main).order :position