Sha256: 78727e83fd02249a33478c5fce43a048da97937015342cb458fe42ee55f6856d
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
module Enjoy module Admin module EmbeddedElement def self.config(_navigation_label = I18n.t('enjoy.cms'), fields = {}) Proc.new { # navigation_label(_navigation_label) unless _navigation_label.nil? field :enabled, :toggle field :name, :string fields.each_pair do |name, type| if type.nil? field name else if type.is_a?(Array) field name, type[0], &type[1] else field name, type end end end if block_given? yield self end } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enjoy_cms-0.2.0.3.2 | lib/enjoy/admin/embedded_element.rb |
enjoy_cms-0.2.0.3.1 | lib/enjoy/admin/embedded_element.rb |
enjoy_cms-0.2.0.3 | lib/enjoy/admin/embedded_element.rb |