Sha256: 18dd9b14c863c2b747273547549d9add9643cb34bf2f21d12c0174721a49d819

Contents?: true

Size: 673 Bytes

Versions: 5

Compression:

Stored size: 673 Bytes

Contents

class <%= camelcased_class_name %> < Enjoy::Catalog::ItemCategoryImage
  embedded_in :item_category, class_name: "<%= item_category_class_name %>"
  alias :<%= underscored_class_name %>_category :item_category

  def self.find(id)
    find_through(<%= item_category_class_name %>, 'item_category_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::ItemCategoryImage.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_category_image.erb
enjoy_cms_catalog-0.3.6 lib/generators/enjoy/catalog/models/templates/item_category_image.erb
enjoy_cms_catalog-0.3.5 lib/generators/enjoy/catalog/models/templates/item_category_image.erb
enjoy_cms_catalog-0.3.4 lib/generators/enjoy/catalog/models/templates/item_category_image.erb
enjoy_cms_catalog-0.3.3 lib/generators/enjoy/catalog/models/templates/item_category_image.erb