My application is a print job ordering site. I am working with a freshly created app with only two models for testing the particular problem I am having.
The Job model:
id, quantity, ink, stock_id, width, height, press_width, press_height
stock_id is a foreign key to stock.id
press_width and press_height refer to the size of the paper which is often larger than the width and height of the job. These are the form fields I want to update when stock_id is selected by dropdown in the job/create form.
The Stock model:
id, name, width, height
I don’t know if my approach needs tweaking or if I need a totally different approach.