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