method
decorations
v2.3.8 -
Show latest stable
- Class:
ActiveRecord::XmlSerializer::Attribute
decorations(include_types = true)public
No documentation available.
# File activerecord/lib/active_record/serializers/xml_serializer.rb, line 303
def decorations(include_types = true)
decorations = {}
if type == :binary
decorations[:encoding] = 'base64'
end
if include_types && type != :string
decorations[:type] = type
end
if value.nil?
decorations[:nil] = true
end
decorations
end