Class: CoreField

Inherits:
Field
  • Object
show all
Defined in:
app/models/fields/core_field.rb

Overview

Schema Information

Table name: fields

id             :integer         not null, primary key
type           :string(255)
field_group_id :integer
position       :integer
name           :string(64)
label          :string(128)
hint           :string(255)
placeholder    :string(255)
as             :string(32)
collection     :text
disabled       :boolean
required       :boolean
maxlength      :integer
created_at     :datetime
updated_at     :datetime

Constant Summary

Constants inherited from Field

Field::FIELD_TYPES, Field::KLASSES

Instance Method Summary collapse

Methods inherited from Field

#collection_string, #collection_string=, #column_type, field_types, #input_options, #render, #render_value

Instance Method Details

#error_on_destroyObject



44
45
46
# File 'app/models/fields/core_field.rb', line 44

def error_on_destroy
  errors.add_to_base "Core fields cannot be deleted."
end