Sha256: 3c98a828b3b6364a8dd218b7d5c8a3e89115ea53d723f3fecd3b6d3ab89dc4b2

Contents?: true

Size: 603 Bytes

Versions: 5

Compression:

Stored size: 603 Bytes

Contents

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

  def self.find(id)
    find_through(<%= 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(rails_admin_add_fields) { |config|
    rails_admin_add_config(config)
  })

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enjoy_cms_catalog-0.3.7 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.3.6 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.3.5 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.3.4 lib/generators/enjoy/catalog/models/templates/item_image.erb
enjoy_cms_catalog-0.3.3 lib/generators/enjoy/catalog/models/templates/item_image.erb