Thanks for any help in advance.
I have what I think is a very straightforward partial template and I
can’t figure out why a text_field call within it doesn’t work.
Here is my calling template: lists.rhtml
In the partial template: _target_lists.rhtml, if I have the following
<%= target_lists[:id] %> <%= target_lists[:name] %>
I see the id and name attributes of each member of @target_lists when I
However, if I do this:
<%= text_field :target_lists, :name %>
I get “undefined method `name’ for #Array:0x38380f0” on the line with
the text_field call.
If I do this:
<%= text_field target_lists, :name %>
I get `@#TargetList:0x3a1ae50’ is not allowed as an instance variable
How can I successfully use the <%= text_field %> call within a partial
on each element of a collection that is being passed in?