diff --git a/lib/action_controller/responder.rb b/lib/action_controller/responder.rb index 5c77ba9..b76974b 100644 --- a/lib/action_controller/responder.rb +++ b/lib/action_controller/responder.rb @@ -303,6 +303,10 @@ def json_resource_errors { errors: resource.errors } end + def xml_resource_errors + resource.errors.to_a.to_xml({ root: "errors", skip_types: true }) + end + def response_overridden? @default_response.present? end