rails / request.js

MIT License
389 stars 28 forks source link

Check if response status is unprocessableEntity #31

Closed olimart closed 3 years ago

olimart commented 3 years ago

This PR adds a convenient helper to check for unprocessableEntity response status.

I bet we don't want to add a helper for each status code but this is motivated by the fact that Rails now returns 422 status code by default for form submission with error https://github.com/rails/rails/pull/41026

So, we can legitimately expect doing this kind of check more often.

marcelolx commented 3 years ago

Can you fix the linting issue?

olimart commented 3 years ago

Can you fix the linting issue?

Done. I think you need to approve the run of CI.

marcelolx commented 3 years ago

Thanks!