lib/hancock/gallery/models/mongoid/image.rb in hancock_cms_gallery-1.0.0 vs lib/hancock/gallery/models/mongoid/image.rb in hancock_cms_gallery-1.0.2
- old
+ new
@@ -3,9 +3,12 @@
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