Sha256: 5d2e7580cc0e3ff849edf5442da5089513f1593d08162833c9e3f2af5403ea73

Contents?: true

Size: 1.15 KB

Versions: 2

Compression:

Stored size: 1.15 KB

Contents

module Enjoy::Pages
  module Models
    module Mongoid
      module Block
        extend ActiveSupport::Concern

        include Enjoy::HtmlField

        included do
          field :name, type: String, default: ""

          field :pageblock_selector, type: String, localize: Enjoy::Pages.config.localize, default: ""
          field :file_path, type: String, localize: Enjoy::Pages.config.localize, default: ""
          field :partial, type: Boolean, default: true
          embedded_in :blockset, inverse_of: :blocks, class_name: "Enjoy::Pages::Blockset"

          enjoy_cms_html_field :content, type: String, localize: Enjoy::Pages.config.localize, default: ""

          field :use_wrapper, type: Boolean, default: false
          field :wrapper_tag, type: String, default: ""
          field :wrapper_class, type: String, default: ""
          field :wrapper_id, type: String, default: ""
          field :wrapper_attributes, type: Hash, default: {}

          field :menu_link_content, type: String
          field :show_in_menu, type: Boolean, default: true
          scope :show_in_menu, -> { where(show_in_menu: true) }
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enjoy_cms_pages-0.4.1 lib/enjoy/pages/models/mongoid/block.rb
enjoy_cms_pages-0.4.0 lib/enjoy/pages/models/mongoid/block.rb