Sha256: c2f51840465eec7bfa1768da14ba4f735f92020ffaa825a38e5619e2baf9ba4c

Contents?: true

Size: 611 Bytes

Versions: 5

Compression:

Stored size: 611 Bytes

Contents

class <%= camelcased_class_name %> < Enjoy::News::Image
  embedded_in :news, class_name: "<%= camelcased_news_class_name %>"
  alias :<%= underscored_class_name %> :news

  def self.find(id)
    find_through(<%= camelcased_news_class_name %>, '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::News::Admin::Image.config(nil, 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_news-0.4.1 lib/generators/enjoy/news/models/templates/image.erb
enjoy_cms_news-0.4.0.2 lib/generators/enjoy/news/models/templates/image.erb
enjoy_cms_news-0.4.0.1 lib/generators/enjoy/news/models/templates/image.erb
enjoy_cms_news-0.4.0 lib/generators/enjoy/news/models/templates/image.erb
enjoy_cms_news-0.4.0.beta3 lib/generators/enjoy/news/models/templates/image.erb