Class: TypedEAV::Field::LongText

Inherits:
Base show all
Defined in:
app/models/typed_eav/field/long_text.rb

Constant Summary

Constants inherited from Base

Base::RESERVED_NAMES

Constants included from ColumnMapping

ColumnMapping::DEFAULT_OPERATORS_BY_COLUMN, ColumnMapping::FALLBACK_OPERATORS

Instance Method Summary collapse

Methods inherited from Base

#allowed_option_values, #apply_default_to, #array_field?, #backfill_default!, #clear_option_cache!, #default_value, #default_value=, export_schema, #field_type_name, import_schema, #insert_at, #move_higher, #move_lower, #move_to_bottom, #move_to_top, #optionable?, #read_value, #storage_contract, storage_contract_class, #write_value

Instance Method Details

#cast(raw) ⇒ Object



10
11
12
# File 'app/models/typed_eav/field/long_text.rb', line 10

def cast(raw)
  [raw&.to_s, false]
end

#validate_typed_value(record, val) ⇒ Object



14
15
16
# File 'app/models/typed_eav/field/long_text.rb', line 14

def validate_typed_value(record, val)
  validate_length(record, val)
end