Sha256: 0b8985296b6f1533626f2a257d854bc273ca8f1750d6eca4905c09ede741e10d

Contents?: true

Size: 784 Bytes

Versions: 25

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

module Maglev
  # Mimic the Page model
  class StaticPage
    ## concerns ##
    include ActiveModel::Model
    include Maglev::Translatable

    ## attributes ##
    attr_accessor :id, :title_translations, :path_translations,
                  :seo_title_translations, :meta_description_translations,
                  :og_title_translations, :og_description_translations, :og_image_url_translations

    ## translations ##
    translates :title, :path, :seo_title, :meta_description, :og_title, :og_description, :og_image_url

    ## methods ##

    def visible
      true
    end

    def static?
      true
    end

    def sections
      []
    end

    def path_hash
      path_translations
    end

    def lock_version
      0
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
maglevcms-1.8.0 app/models/maglev/static_page.rb
maglevcms-1.7.3 app/models/maglev/static_page.rb
maglevcms-1.7.2 app/models/maglev/static_page.rb
maglevcms-1.7.1 app/models/maglev/static_page.rb
maglevcms-1.7.0 app/models/maglev/static_page.rb
maglevcms-1.6.1 app/models/maglev/static_page.rb
maglevcms-1.6.0 app/models/maglev/static_page.rb
maglevcms-1.5.1 app/models/maglev/static_page.rb
maglevcms-1.4.0 app/models/maglev/static_page.rb
maglevcms-1.3.0 app/models/maglev/static_page.rb
maglevcms-1.2.2 app/models/maglev/static_page.rb
maglevcms-1.2.1 app/models/maglev/static_page.rb
maglevcms-1.2.0 app/models/maglev/static_page.rb
maglevcms-1.1.7 app/models/maglev/static_page.rb
maglevcms-1.1.6 app/models/maglev/static_page.rb
maglevcms-1.1.5 app/models/maglev/static_page.rb
maglevcms-1.1.4 app/models/maglev/static_page.rb
maglevcms-1.1.3 app/models/maglev/static_page.rb
maglevcms-1.1.2 app/models/maglev/static_page.rb
maglevcms-1.1.1 app/models/maglev/static_page.rb