# File lib/active_model/serializers/xml.rb, line 143 def from_xml(xml) self.attributes = Hash.from_xml(xml).values.first self end
Returns XML representing the model. Configuration can be passed through
options
.
# File lib/active_model/serializers/xml.rb, line 139 def to_xml(options = {}, &block) Serializer.new(self, options).serialize(&block) end