Sha256: 74bad57de90cb84639a20af7527f80033cc6fc443d836a658981d5d0bfb9e056
Contents?: true
Size: 596 Bytes
Versions: 2
Compression:
Stored size: 596 Bytes
Contents
module Hancock::Gallery if Hancock::Gallery.mongoid? class EmbeddedImage < Hancock::EmbeddedElement include Hancock::Gallery::Models::EmbeddedImage include Hancock::Gallery::Decorators::EmbeddedImage rails_admin(&Hancock::Gallery::Admin::EmbeddedImage.config(rails_admin_add_fields) { |config| rails_admin_add_config(config) }) # use it in rails_admin in parent model for sort # sort_embedded({fields: [:embedded_field_1, :embedded_field_2...]}) # or u need to override rails_admin in inherited model to add sort field end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hancock_cms_gallery-1.0.2 | app/models/hancock/gallery/embedded_image.rb |
hancock_cms_gallery-1.0.0 | app/models/hancock/gallery/embedded_image.rb |