instance method serialize

Ruby on Rails 7.1.6

Since v7.1.6

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

Signature

serialize(value)

No documentation comment.

Parameters

value req
Source
# File activemodel/lib/active_model/type/immutable_string.rb, line 48
      def serialize(value)
        case value
        when ::Numeric, ::Symbol, ActiveSupport::Duration then value.to_s
        when true then @true
        when false then @false
        else super
        end
      end

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

Defined in ActiveModel::Type::ImmutableString

Type at least 2 characters to search.

↑↓ navigate · open · esc close