Sha256: ff1eda1c96bdbcc0fe01f9b68b3ff1ead0c19073440fdaaac686c6a24680a288

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

module Enjoy::Catalog
  module Models
    module Item
      extend ActiveSupport::Concern
      include Enjoy::Model
      include Enjoy::Enableable
      if Enjoy::Catalog.config.seo_support
        include Enjoy::Seo::Seoable
        include Enjoy::Seo::SitemapDataField
      end
      if Enjoy::Catalog.config.pages_support
        include Enjoy::Pages::Connectable
      end
      if Enjoy::Catalog.config.gallery_support
        include Enjoy::Gallery::Paperclipable
      end
      # include Mongoid::MoneyField

      include Enjoy::Catalog.orm_specific('Item')

      include ManualSlug

      included do
        manual_slug :name

        if Enjoy::Catalog.config.pages_support and Enjoy::Catalog.configuration.can_connect_items_with_pages
          enjoy_connectable_field :connected_pages
        end

        if Enjoy::Catalog.config.gallery_support and Enjoy::Catalog.configuration.item_image_styles
          enjoy_cms_attached_file(:image)
        end
      end

      def image_styles
        Enjoy::Catalog.configuration.item_image_styles
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enjoy_cms_catalog-0.4.1 lib/enjoy/catalog/models/item.rb
enjoy_cms_catalog-0.4.0.6 lib/enjoy/catalog/models/item.rb