Return JSON on error

This commit is contained in:
hakanensari 2014-06-19 12:31:47 +01:00
parent 76aa21c239
commit c7c98881b9

View File

@ -30,7 +30,7 @@ helpers do
end
def halt_with_meaningful_response(status, message)
halt status, message
halt status, Yajl::Encoder.encode(error: { status: status, message: message })
end
end