instance method
to_xml
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v4.2.9Signature
to_xml(options = {}, &block)
Returns XML representing the model. Configuration can be passed through options.
Parameters
-
optionsopt = {} -
blockblock
Source
# File activemodel/lib/active_model/serializers/xml.rb, line 139
def to_xml(options = {}, &block)
Serializer.new(self, options).serialize(&block)
end
Defined in activemodel/lib/active_model/serializers/xml.rb line 139
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Serializers::Xml