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
work:
<% 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)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---