在我的adminpage#index
控制器中,我定义了@software
:
if Software.first != nil
@software = Software.first
else
@software = Software.new
end
然后在我的表格中我有:
<% form_for(@software), :url => adminpage_setting_path do |f| %>
<%= f.label 'Name der zugelassenen Software' %>
<%= f.text_field :software %><br>
<%= f.label 'Software-Relase' %>
<%= f.text_field :release %><br>
<%= f.label 'Softwareverantwortlicher' %>
<%= f.text_field :sv %><br>
<% end %>
不知何故,这会引发错误:
syntax error, unexpected ',', expecting keyword_end
'; form_for(@software), :url => adminpage_setting_pa...
^
我真的不知道我做错了什么!谢谢