Sha256: 03388022af30935fdeb7d8f96e6ae4fd6652ee09f0a3f15374ca109314abc1f0
Contents?: true
Size: 932 Bytes
Versions: 11
Compression:
Stored size: 932 Bytes
Contents
module Enjoy module Admin module EmbeddedGalleryImage def self.config(fields = {}) jcrop_proc = Proc.new do jcrop_options :image_jcrop_options end if fields if fields.is_a?(Hash) fields.reverse_merge!({image: [:jcrop, jcrop_proc]}) else finded = false fields.each { |g| finded = !!g[:fields][:image] unless finded } unless finded fields << { name: :image, fields: { image: [:jcrop, jcrop_proc] } } end end end if block_given? Enjoy::Admin::EmbeddedElement.config(nil, fields) do |config| yield config end else Enjoy::Admin::EmbeddedElement.config(nil, fields) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems