app/models/tramway/landing/block.rb in tramway-landing-3.0 vs app/models/tramway/landing/block.rb in tramway-landing-3.0.0.1
- old
+ new
@@ -30,9 +30,10 @@
active.joins(:page).where(view_state: :published).where('tramway_page_pages.page_type = ?', :main).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 }
+ scope :published, -> { where(view_state: :published) }
def link_object
link_object_type.constantize.find link_object_id
end