Trying to make this application RESTy

Ok, here’s the basic workflow:

  1. A user inputs an order for a customer. This consists of several
    line items of equipment rental. (So, for example, 3 trucks at 7 am,
    7:30, and 8am for June 23). (Ok, this part is easy… a standard Order
    resource with the usual CRUD actions)

  2. A user (may be the same as #1, or may not) must fulfill the order,
    so he must be able to pull up a list of unassigned work (for a
    particular day, for example), see this work is still unassigned and
    assign 3 trucks to this job. (This is where things get fuzzy. Is
    this specialized index action on Order? I don’t think so because
    we’re editing the orders, not just listing them. Is this a separate
    resource?)

  3. A user (may be the same, may not) must later go back and fill out
    the hours the trucks actually worked, so they must first be able to
    pull up a list of all work which has been completed to date and see
    this work has been assigned but not yet recorded. (Same problem… is
    this another resource, or another view on the resource in number 2?)

I think there are two ways of looking at this:

a) Set of Orders. Then 2) and 3) are nothing but edit on an order.
b) Set of lines. Then 2) and 3) are index lines with a find clause
(for example find unassigned lines or find unrecorded lines) and then
edit on an individual line.

HTH.

Cheers

|-----Original Message-----
|From: [email protected] [mailto:rubyonrails-
|[email protected]] On Behalf Of Anthony
|Sent: Wednesday, February 11, 2009 3:02 PM
|To: Ruby on Rails: Talk
|Subject: [Rails] Trying to make this application RESTy
|
|
|Ok, here’s the basic workflow:
|
|1) A user inputs an order for a customer. This consists of several
|line items of equipment rental. (So, for example, 3 trucks at 7 am,
|7:30, and 8am for June 23). (Ok, this part is easy… a standard Order
|resource with the usual CRUD actions)
|
|2) A user (may be the same as #1, or may not) must fulfill the order,
|so he must be able to pull up a list of unassigned work (for a
|particular day, for example), see this work is still unassigned and
|assign 3 trucks to this job. (This is where things get fuzzy. Is
|this specialized index action on Order? I don’t think so because
|we’re editing the orders, not just listing them. Is this a separate
|resource?)
|
|3) A user (may be the same, may not) must later go back and fill out
|the hours the trucks actually worked, so they must first be able to
|pull up a list of all work which has been completed to date and see
|this work has been assigned but not yet recorded. (Same problem… is
|this another resource, or another view on the resource in number 2?)
|
|

But that’s kind of the problem… I don’t want to edit lines one at a
time. I want a batch edit.

On Feb 11, 11:04 pm, “Krishna Sankar (ksankar)” [email protected]