instance method
serialize
Ruby on Rails 8.1.2
Since v7.1.6Signature
serialize(value)
No documentation comment.
Parameters
-
valuereq
Source
# File activemodel/lib/active_model/type/immutable_string.rb, line 50
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 50
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Type::ImmutableString