app/models/tramway/landing/block.rb in tramway-landing-2.2.2.1 vs app/models/tramway/landing/block.rb in tramway-landing-2.2.3

- old
+ new

@@ -18,10 +18,15 @@ event :hide do transition published: :hidden end end - scope :on_main_page, -> { active.where(view_state: :published).order :position } + store_accessor :values, :page + store_accessor :values, :form_url + + scope :on_main_page, -> do + active.where(view_state: :published).where("(values -> 'page') IS NOT NULL").order :position + end scope :with_navbar_link, -> { where navbar_link: :exist } scope :header, -> { on_main_page.where(block_type: :header).first } scope :footer, -> { on_main_page.where(block_type: :footer).first } def link_object