Sha256: 7fb44335ace8f5ea6ae1d9ceb9be4e52ce428fbd317e8c311d69cb4b5768d872
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
class <%= camelcased_class_name %> < Hancock::Gallery::EmbeddedImage embedded_in :<%= underscored_parent_class_name %>, class_name: "<%= camelcased_parent_class_name %>" def self.find(id) find_through(<%= camelcased_parent_class_name %>, '<%= underscored_pluralized_class_name %>', id) end # # after_save :image_auto_rails_admin_jcrop # def image_auto_rails_admin_jcrop # auto_rails_admin_jcrop(:image) # or nil for cancel autocrop # end # # hancock_cms_attached_file(:image) # def image_styles # super # end # def image_jcrop_options # super # end ############# rails_admin ############## def self.rails_admin_add_fields super end def self.rails_admin_add_config(config) super(config) end def self.admin_can_user_defined_actions [].freeze end def self.admin_cannot_user_defined_actions [].freeze end def self.manager_can_user_defined_actions [].freeze end def self.manager_cannot_user_defined_actions [].freeze end def self.rails_admin_user_defined_visible_actions [].freeze end # rails_admin(&Hancock::Gallery::Admin::EmbeddedElement.config(%NAV_LABEL%, rails_admin_add_fields) { |config| rails_admin(&Hancock::Gallery::Admin::EmbeddedImage.config(nil, rails_admin_add_fields) { |config| rails_admin_add_config(config) }) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hancock_cms_gallery-1.0.2 | lib/generators/hancock/gallery/models/templates/embedded_image.erb |