class String

Ruby on Rails 8.0.4

Since v5.2.8.1

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Active Model String Type

Attribute type for strings. It is registered under the :string key.

This class is a specialization of ActiveModel::Type::ImmutableString. It performs coercion in the same way, and can be configured in the same way. However, it accounts for mutable strings, so dirty tracking can properly check if a string has changed.

Inherits from

ActiveModel::Type::ImmutableString

Methods (defined here)

Private methods

(1) Implementation detail — not part of the public API.

Methods (inherited)

From ActiveModel::Type::ImmutableString (3)

Type at least 2 characters to search.

↑↓ navigate · open · esc close