Module: RablRails::Renderers::XML

Extended by:
XML
Includes:
Hash
Included in:
XML
Defined in:
lib/rabl-rails/renderers/xml.rb

Instance Method Summary collapse

Methods included from Hash

#render

Methods included from Helpers

#collection?

Instance Method Details

#format_output(hash, options = {}) ⇒ Object



9
10
11
12
# File 'lib/rabl-rails/renderers/xml.rb', line 9

def format_output(hash, options = {})
	xml_options = { root: options[:root_name] }.merge!(RablRails.configuration.xml_options)
				hash.to_xml(xml_options)
end

#resolve_cache_key(key, data) ⇒ Object



14
15
16
# File 'lib/rabl-rails/renderers/xml.rb', line 14

def resolve_cache_key(key, data)
  "#{super}.xml"
end