lib/mks/common/methodresponse.rb in mks_common-1.0.9 vs lib/mks/common/methodresponse.rb in mks_common-1.0.10
- old
+ new
@@ -23,10 +23,10 @@
return MethodResponse.new(true, msg, data.json, nil, nil)
end
end
def self.error_response(data)
- errors = data.is_a?(String) ? data : data.errors
+ errors = data.is_a?(String) ? [data] : data.errors
return MethodResponse.new(false,nil, nil, errors, nil)
end
def self.failure_response(data)
data.errors.details
\ No newline at end of file