hpi-swt2-exercise / rails-exercise-17-swteam

rails-exercise-17-swteam created by GitHub Classroom
MIT License
0 stars 1 forks source link

Edit paper page should allow to select 5 authors from 5 separate drop downs #36

Closed swt2public closed 6 years ago

swt2public commented 6 years ago

Scenario

Given a paper When a user visits the paper's edit page Then it should have a select box for the first author

Hints

Create a <label> for each <select> and set the for attribute of the label to the id of the select. For example

f.label "Author 1", for: "paper_author_id_1"
f.collection_select :author_ids, authors, :id, :name, {selected: @paper.author_ids[1], include_blank: '(none)'}, {name: "paper[author_ids][]", id: "paper_author_id_1"}

See collection_select

Error

Expected to find field "author 1" but there were no matches

Estimated progress: 92% complete