Sha256: b41f49337dbd2321cbf1d688544df6adad29d900ee061eff1a7942852be08cd1

Contents?: true

Size: 432 Bytes

Versions: 1

Compression:

Stored size: 432 Bytes

Contents

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

        included do
          index({gallery_id: 1}, {background: true})
          index({enabled: 1, lft: 1}, {background: true})

          field :name, type: String, localize: Hancock::Gallery.configuration.localize

          scope :sorted, -> { order_by([:lft, :asc]) }
        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/image.rb