instance method to_xml

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v4.2.9

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9

Signature

to_xml(options = {}, &block)

Returns XML representing the model. Configuration can be passed through options.

Parameters

options opt = {}
block block
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close