Sha256: f858f8670e5d155f42d53a7ef4667c2523a5b408ede760b824018c36149713a3
Contents?: true
Size: 748 Bytes
Versions: 3
Compression:
Stored size: 748 Bytes
Contents
module Enjoy module Models module Gallery extend ActiveSupport::Concern include Enjoy::Model include ManualSlug include Enjoy::Enableable include Enjoy::SitemapDataField module ClassMethods def gallery_image_class_name "Enjoy::GalleryImage" end def gallery_image_class gallery_image_class_name.constantize end end include Enjoy.orm_specific('Gallery') included do has_many :gallery_images, class_name: gallery_image_class_name field :name, type: String, localize: Enjoy.configuration.localize validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/, if: :image? end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enjoy_cms-0.2.0.2 | lib/enjoy/models/gallery.rb |
enjoy_cms-0.2.0.1.beta | lib/enjoy/models/gallery.rb |
enjoy_cms-0.2.0.beta | lib/enjoy/models/gallery.rb |