Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new nursey table form (bug) #67

Closed
LizPrescott opened this issue Aug 14, 2019 · 1 comment · Fixed by #68
Closed

Fix new nursey table form (bug) #67

LizPrescott opened this issue Aug 14, 2019 · 1 comment · Fixed by #68

Comments

@LizPrescott
Copy link
Collaborator

LizPrescott commented Aug 14, 2019

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

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)

@conj40
Copy link
Contributor

conj40 commented Aug 14, 2019

Hi there @LizPrescott , i have found a fix for this. Will do a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants