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