Sha256: cc1e2b80c3d9b4de60e5bc215a8e67fe9298beee9e82d26fe4ef1e71ac275d5d

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

module Hancock::Gallery
  module Models
    module Mongoid
      module OriginalImage
        extend ActiveSupport::Concern

        included do
          index({originable_id: 1, originable_type: 1}, {background: true})

          field :original, type: BSON::Binary

          hancock_cms_attached_file(:image, url: "/system/:class/:attachment/:id_partition/:style/:hash.:extension",
                                            hash_data: ":class/:attachment/:id/:style/:created_at",
                                            hash_secret: Hancock::Gallery.config.original_image_hash_secret
          )
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hancock_cms_gallery-1.0.2 lib/hancock/gallery/models/mongoid/original_image.rb