Alright, so this problem is two fold. One probably has a simple
And the other probably has a simple answer...
1) I have many different controllers... three of note would be
'order', 'review' & 'quote'.
if im in viewing "/orders/list" i would like to generate a link to go
to the corresponding review & quote.
can a generic link_to be somehow cajoled into going to "/reviews/show/
23432" where 23432 is the review_id of the order?
problem 2) i can think of a million and one kludgy ways to do this but
none of them seem to be good rails form...
the same app has a model for inspection sheets. each order is assigned
an inspection sheet and each inspection sheet has multiple validated
fields which are created by whoever approves the order... for
example... (and believe me, this is a gross oversimplification)
order #23432 is for a custom made, standard square box.
the boxes will be made by hand and each operator is going to check for
length, width and height of the box, limits specified at order time
heres where i think polymorphism might be a good solution, just dont
know how to properly implement it...
the length width and height are all numbers with a given range. when
the inspected boxes are out of that range i'll raise some kind of
error or something...
the visual inspection (and many other types of fields) are booleans...
go/no go... good/no good... etc..
my original scheme went something like this...
inspection_sheets: table containing all sheet_id's and their
inspection_sheet_fields: a table to hold all the definition fields as
users create them for new inspection sheets.. it would have a
sheet_id, field_name...eg "length", and in the case of numerical
input.. a max_value and a min_value... or in the case of booleans...
just a good_value...
inspection_sheet_rows: a table which would contain a sheet_id,
field_id and a "measured_value" or some such.. to hold the physical
now if you ask me, that last table, especially that last table - will
get filled up in quite a hurry... but thats another bridge to cross at
another time... not to mention the cost of re-evaluating the entire
insepction sheet every time someone one wants to do "inspection_sheets/
im just looking for some suggestion on how to do this rubily...
thanks for the input.