app/models/landable/page.rb in landable-1.9.0.rc1 vs app/models/landable/page.rb in landable-1.9.0.rc2
- old
+ new
@@ -6,10 +6,11 @@
module Landable
class Page < ActiveRecord::Base
include ActionView::Helpers::TagHelper
include Landable::HasAssets
+ include Landable::HasTemplates
include Landable::Engine.routes.url_helpers
include Landable::TableName
include Landable::Librarian
validates_presence_of :path, :status_code
@@ -32,9 +33,12 @@
belongs_to :category, class_name: 'Landable::Category'
belongs_to :updated_by_author, class_name: 'Landable::Author'
belongs_to :hero_asset, class_name: 'Landable::Asset'
has_many :revisions, class_name: 'Landable::PageRevision'
has_many :screenshots, class_name: 'Landable::Screenshot', as: :screenshotable
+ has_many :audits, class_name: 'Landable::Audit', as: :auditable
+
+ delegate :republish!, to: :published_revision
scope :imported, -> { where("imported_at IS NOT NULL") }
scope :sitemappable, -> { where("COALESCE(meta_tags -> 'robots' NOT LIKE '%noindex%', TRUE)")
.where(status_code: 200)}
scope :published, -> { where("published_revision_id is NOT NULL") }