Sha256: fd4cf083d4779c96f114193d997c7c831236783b6c4a04e62a4f8762b7af18cb

Contents?: true

Size: 523 Bytes

Versions: 14

Compression:

Stored size: 523 Bytes

Contents

module CmAdmin
  module Models
    class Field

      attr_accessor :field_name, :label, :header, :field_type, :format, :precision,
        :helper_method, :preview, :custom_link, :precision, :prefix, :suffix, :tag_class

      def initialize(field_name, attributes = {})
        @field_name = field_name
        set_default_values
        attributes.each do |key, value|
          self.send("#{key.to_s}=", value)
        end
      end

      def set_default_values
        self.tag_class = {}
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cm-admin-0.7.8 lib/cm_admin/models/field.rb
cm-admin-0.7.7 lib/cm_admin/models/field.rb
cm-admin-0.7.6 lib/cm_admin/models/field.rb
cm-admin-0.7.5 lib/cm_admin/models/field.rb
cm-admin-0.7.4 lib/cm_admin/models/field.rb
cm-admin-0.7.3 lib/cm_admin/models/field.rb
cm-admin-0.7.2 lib/cm_admin/models/field.rb
cm-admin-0.7.1 lib/cm_admin/models/field.rb
cm-admin-0.7.0 lib/cm_admin/models/field.rb
cm-admin-0.6.9 lib/cm_admin/models/field.rb
cm-admin-0.6.8 lib/cm_admin/models/field.rb
cm-admin-0.6.7 lib/cm_admin/models/field.rb
cm-admin-0.6.6 lib/cm_admin/models/field.rb
cm-admin-0.6.5 lib/cm_admin/models/field.rb