Hello!
My class Batch has_many :storage_assignments. So when someone creates a
batch of pizzas, he can create a batch and "Create Another"
StorageAssignment for each pizza/drawer-in-the-freezer (Pizza has_many
:batches, :as => :variety and Batch belongs_to :variety, :polymorphic =>
true
I overwrote the UI for selecting a StorageAssignment with a partial, and
it now uses JQuery-UIs Selectable to let the user create not one, but
many StorageAssignments. As a StorageAssignment belongs_to both :freezer
and :drawer, the user can "Create Another" StorageAssignment, select the
freezer, causing the drawer-ui to reload and show that freezers drawers.
Then, the user selects *multiple* drawers from that freezer which he
filled with pizzas from that batch.
If he filled another freezer with pizzas, he clicks on "Create Another"
again and uses my UI in that second row of the nested table to fill
multiple pizzas into that second freezer.
Now my questions:
How can I allow multiple StorageAssignments (for one freezer) to be
created within a single create-another-row? The ui is already working
and sending a freezer-id and a comma-separated list of drawer-ids
instead of just a single id. But how would I patch the controller to
create a storage_assignment for each of those drawer_ids?
How can I make AS show only one storage-assignment subrow for each
freezer in the edit-view, not for each drawer?
Last but not least, which variable is used to create the numbers for
unique form elements in all subrows, like
"record[storage_assignments]*[1280705590951]*[drawer][id]"?
thanks!
ben
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.