Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help fitting a design flow into REST
    primarykey
    data
    text
    <p>I'm having a bit of a trouble understanding how to fit a particular design flow I have into a proper REST architecture. Let me explain the flow:</p> <p>I'm creating technical support website where users can submit <strong>ProblemRequests</strong>. On the front page, the user selects all the categories he's having trouble with and clicks "get help," which then redirects him to the next page where he fills out some forms to submit his request. Here are the pages:</p> <p><a href="http://i.minus.com/ijzMDj1LiPxFI.png" rel="nofollow">Page 1 - Select Problem Categories</a></p> <p><a href="http://i.minus.com/ibzdee6NK8hqhV.png" rel="nofollow">Page 2 - Fill out Problem Request</a></p> <p>Page 2 basically acts like the NEW action for a <strong>ProblemRequest</strong>. The thing is each ProblemRequest depends on multiple <strong>ProblemCategories</strong>, so a nested route isn't going to work here. The next thing that comes to mind is sending in all relevant ProblemCategories ids as an GET param for the <em>NEW</em> <strong>ProblemRequest</strong> action, but I would rather not expose the IDs in the URL.</p> <p>A Multi-Part form sort of comes to mind, but that involves making <strong>ProblemRequests</strong> have state, where some would be complete and others incomplete. I don't want to deal with the implications, because in reality this is a one page submission, not a very long-winded process.</p> <p>What would work ideally is to override the NEW action for the <strong>ProblemRequests controller</strong> to respond to POST operations, but I don't know if this is considered bad programming practice. Is this a cardinal sin? Is it okay for me to change the NEW action to respond to POST instead of GET?</p> <p>Please advise,</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload