instance method cast_value

Ruby on Rails 8.1.2

Since v7.1.6 Private

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

cast_value(value)

No documentation comment.

Parameters

value req
Source
# File activemodel/lib/active_model/type/date_time.rb, line 62
        def cast_value(value)
          return apply_seconds_precision(value) unless value.is_a?(::String)
          return if value.empty?

          fast_string_to_time(value) || fallback_string_to_time(value)
        end

Defined in activemodel/lib/active_model/type/date_time.rb line 62 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Type::DateTime

Type at least 2 characters to search.

↑↓ navigate · open · esc close