Method: ActiveModel::Type::ImmutableString#serialize
- Defined in:
- activemodel/lib/active_model/type/immutable_string.rb
#serialize(value) ⇒ Object
48 49 50 51 52 53 54 55 |
# 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 |