Expected behavior:
New nursery table form should create a new nursery table associated with the selected zone. Form should populate a zone id based on the dropdown.
Actual behavior:
Attempts to create a new nursery table result in an error "Zone must exist" even if I have a zone selected:
In the console, I noticed that the form is using the zone name, rather than the id, to look for the zone.
Processing by NurseryTablesController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"XsLtVJiFRo1+QE3Z4GySTPUNReOrccOERlRoK5dSLiIDSZcHxCgFIyz8MTL/zlzQfW1sTwJODjodtUlSHP3NOQ==", "nursery_table"=>{"capacity"=>"200", "zone_id"=>"fa", "name"=>"fa"}, "commit"=>"Create Nursery table"}
Step to reproduce:
Create a new zone at /zones/new
Navigate to nursery_tables/new
Select your new zone from the drop down.
Fill in all fields with test data and hit "Create Nursery Table"
Observe errors in the browser and the rails console (you may need to scroll up)
Expected behavior: New nursery table form should create a new nursery table associated with the selected zone. Form should populate a zone id based on the dropdown.
Actual behavior: Attempts to create a new nursery table result in an error "Zone must exist" even if I have a zone selected:![Screenshot_2019-08-14 Coral Gardeners](https://user-images.githubusercontent.com/7306644/63039080-86f0b200-be90-11e9-94c5-2f210f17109e.png)
In the console, I noticed that the form is using the zone name, rather than the id, to look for the zone.
Processing by NurseryTablesController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"XsLtVJiFRo1+QE3Z4GySTPUNReOrccOERlRoK5dSLiIDSZcHxCgFIyz8MTL/zlzQfW1sTwJODjodtUlSHP3NOQ==", "nursery_table"=>{"capacity"=>"200", "zone_id"=>"fa", "name"=>"fa"}, "commit"=>"Create Nursery table"}
Step to reproduce: Create a new zone at /zones/new Navigate to nursery_tables/new Select your new zone from the drop down. Fill in all fields with test data and hit "Create Nursery Table" Observe errors in the browser and the rails console (you may need to scroll up)