Class: TypedEAV::Field::Text
- Inherits:
-
ValidatedString
- Object
- ActiveRecord::Base
- ApplicationRecord
- Base
- ValidatedString
- TypedEAV::Field::Text
- Defined in:
- app/models/typed_eav/field/text.rb
Overview
String-typed field with optional length / pattern guards. Storage, ‘store_accessor`, numericality validators, `max_gte_min_length`, `validate_pattern_syntax`, and the default `validate_typed_value` (length + pattern) all come from `Field::ValidatedString`. Text adds only `cast` (raw → String).
Constant Summary
Constants inherited from Base
Constants included from TypedStorage
TypedEAV::Field::TypedStorage::DEFAULT_OPERATORS_BY_COLUMN, TypedEAV::Field::TypedStorage::FALLBACK_OPERATORS
Instance Method Summary collapse
Methods inherited from ValidatedString
Methods inherited from Base
#allowed_option_values, #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?, #validate_typed_value
Methods included from TypedStorage
#after_snapshot, #apply_default, #before_snapshot, #read_value, #value_changed?, #write_value
Instance Method Details
#cast(raw) ⇒ Object
18 19 20 |
# File 'app/models/typed_eav/field/text.rb', line 18 def cast(raw) [raw&.to_s, false] end |