Sha256: 246cd01e7070096ce5f7a5192a4b74a18a8fa7af338d64f1d89bd907cd0a2bc4

Contents?: true

Size: 625 Bytes

Versions: 1

Compression:

Stored size: 625 Bytes

Contents

module Enjoy
  module Models
    module GalleryImage
      extend ActiveSupport::Concern
      include Enjoy::Model
      include Enjoy::Enableable

      include Enjoy.orm_specific('GalleryImage')

      included do

        belongs_to :gallery, class_name: "Enjoy::Gallery"
        field :name, type: String, localize: Enjoy.configuration.localize

        validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/, if: :image?
      end

      module ClassMethods
        def rails_admin_add_fields
          {}
        end

        def rails_admin_add_config(config)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enjoy_cms-0.2.1 lib/enjoy/models/gallery_image.rb