This question has been asked many times but I can not get it to work.
I want to pass multiple vars to my partial like this...
<%= f.fields_for :materials do |builder| %>
<%= render partial: 'material_fields', locals: {f: builder, feed: true} %>
<% end %>
And here is a line from partial material_fields.html.erb which I want the f.select to be pre-populated with the Yes option or "true" value. (some instances I want it to be false)
<%=f.select :is_feed, options_for_select([['Yes', true], ['No', false]], feed )%>
f
is available and works while feed
is not .....I dont know why this doesn't work.
Ive tried <%= feed %> outside the select statement and it still does not work.
I get undefined local variable or method `feed' in both cases.
Anyone know what is wrong with my syntax?