Module: ClassyResources::SequelErrorsToXml
- Defined in:
- lib/classy_resources/sequel_errors_to_xml.rb
Instance Method Summary collapse
Instance Method Details
#to_xml(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/classy_resources/sequel_errors_to_xml.rb', line 5 def to_xml(={}) [:root] ||= "errors" [:indent] ||= 2 [:builder] ||= Builder::XmlMarkup.new(:indent => [:indent]) [:builder].instruct! unless .delete(:skip_instruct) [:builder].errors do |e| .each { |msg| e.error(msg) } end end |