Sha256: 59ed8b332febeb025cf175197246f2120f070abf5a4b3056368e15d12bbea600

Contents?: true

Size: 630 Bytes

Versions: 9

Compression:

Stored size: 630 Bytes

Contents

class <%= camelcased_class_name %> < Enjoy::Catalog::ItemImage
  embedded_in :item, class_name: "<%= camelcased_item_class_name %>"
  alias :<%= underscored_class_name %> :item

  def self.find(id)
    find_through(<%= camelcased_item_class_name %>, 'item_images', id)
  end

  def image_styles
    {}
  end

  def image_jcrop_options
    {}
  end


  ############# rails_admin ##############
  def self.rails_admin_add_fields
    {}
  end

  def self.rails_admin_add_config(config)
  end

  rails_admin(&Enjoy::Catalog::Admin::ItemImage.config(nil, rails_admin_add_fields) { |config|
    rails_admin_add_config(config)
  })

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enjoy_cms_catalog-0.4.1 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.6 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.5 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.4 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.3 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.2 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.1 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.4.0.beta3 lib/generators/enjoy/catalog/models/templates/item_image.erb