Best way to handle failed updates when using REST?

I’m playing with simply_restfuld/REST. My (test) controller has the
following actions:

index, new, create, show, edit, update, destroy

Everything is fine at the moment except on how to handle failed updates.

As I see it, there are 3 scenarios with a failed update:

  • redirect to edit action, but the form’s data will be lost.
  • render the edit action, but the url will not be quite right.
  • add a form to the update view, but then i’m repeating myself (can
    the update view render data in the first place ?).

I don’t see a good solution to this “problem”. Sorry if i’m being
pedantic with this question, I just want to get a good grasp of the REST
way of doing things and this is in the way :slight_smile:

thanks in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs