Sha256: bdf8262ccbd8b2c9c550fc944b5ad1c8e5b2a0c294866d2fa0265daaa7dddb6d

Contents?: true

Size: 658 Bytes

Versions: 6

Compression:

Stored size: 658 Bytes

Contents

class <%= camelcased_class_name %> < Enjoy::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

  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::Gallery::Admin::EmbeddedImage.config(nil, rails_admin_add_fields) { |config|
    rails_admin_add_config(config)
  })

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enjoy_cms_gallery-0.4.1 lib/generators/enjoy/gallery/models/templates/embedded_image.erb
enjoy_cms_gallery-0.4.0.2 lib/generators/enjoy/gallery/models/templates/embedded_image.erb
enjoy_cms_gallery-0.4.0.1 lib/generators/enjoy/gallery/models/templates/embedded_image.erb
enjoy_cms_gallery-0.4.0 lib/generators/enjoy/gallery/models/templates/embedded_image.erb
enjoy_cms_gallery-0.4.0.beta3 lib/generators/enjoy/gallery/models/templates/embedded_image.erb
enjoy_cms_gallery-0.4.0.beta1 lib/generators/enjoy/gallery/models/templates/embedded_image.erb