I have an ajax post as such:
$.post("/api/v1/payment_methods/create_credit_card", values)
.done (response) ->
console.log("GOOD JOB")
.fail (response) ->
console.log("Adas")
The response is a 201, however, done doesn't seem to be capturing it and instead it's going to fail. I thought 201 would of been considered a success and would of been captured by done. Any ideas of why it wouldn't be working?
Note: The above code is in coffeescript, which doesn't really affect the question but explains my syntax