Return meaningful error message for 422

private-asciicasts
Marcin Kulik 9 years ago
parent f45ff47737
commit 8264105ca3

@ -11,7 +11,7 @@ module Api
location: asciicast
rescue ActiveRecord::RecordInvalid => e
render nothing: true, status: 422
render text: e.record.errors.messages, status: 422
end
def show

Loading…
Cancel
Save