Ok, I’ll try one more time…I’ve read the book, I’ve searched the docs,
I can’t find the answer this puzzle.
Surely someone can help!
@rs is an array, and I want to have a select field for each item in @rs.
How can I do this? The following (which is inside a form_for) does not
<% for r in @rs %> <% fields_for r do |f| %> Employee: <%= f.select (:employee_id, ['alan', 'bob'] %><br/> <% end %> <% end %>
I get the error
‘@#AccountEmployeeRelation:0xb7628038’ is not allowed as an instance
(each item in @rs is an AccountEmployeeRelation)