1
林on Rails的4.我有我想要一个页面显示形式对他们每个人的更新字段对象的两个列表如何从数组中创建表单列表?
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1>Teas</h1>
<% @teas.each do |tea| %>
<%= form_tag(controller: "teas", action: "update", method: "patch") %>
<%= label_tag(:price, tea.name.titleize) %>
<%= text_field_tag :price %>
<% end %>
<% end %>
<h1>Mixins</h1>
<% @mixins.each do |mixin| %>
<%= form_tag(controller: "mixins", action: "update", method: "patch") %>
<%= label_tag(:price, mixin.name.titleize) %>
<%= text_field_tag :price %>
<% end %>
<% end %>
</div>
</div>
当我用这个,我得到一个syntax error, unexpected keyword_end, expecting end-of-input
错误。这里有什么问题?
啊......当然是我 – oobie11