sumeetjain / outcomes-tracker

0 stars 0 forks source link

114 Accepted Offer creates a New Position #116

Closed halfghaninne closed 8 years ago

halfghaninne commented 8 years ago

Fixes #114


Login Credentials

Your GH Profile. You should be a "student" User to test this Issue.


Functionality to Test

halfghaninne commented 8 years ago

I was expecting to click "Accepted Position" on an Entry's show page and be taken to a form to confirm details of the Position.

Instead I got an error undefined method 'merge' for "full-time":String

screen shot 2016-09-08 at 2 37 23 pm

Both the offers#add_new_to_existing_entry and positions#add_new_to_existing_entry set up @entry the same way.

In console, when I check Position.nature_of_employments.keys each is a string, not a symbol.

I'm not sure what the mismatch is and why it's only throwing for the new Position form but not for Offer.

sumeetjain commented 8 years ago

Your code is not the same as what works in offers#add_new_to_existing_entry:

<%= f.select(:nature_of_employment, Position.nature_of_employments.keys, @entry.offer.nature_of_employment) %>

<%= f.select(:nature_of_employment, options_for_select(Offer.nature_of_employments.keys, @entry.job_application.nature_of_employment)) %>
sumeetjain commented 8 years ago

Small change. Merge at will after that.