以下代码是我的语法错误。我尝试过一个示例网站,但我想我必须把一些东西放在错误的地方或没有添加一些东西。如果有人能告诉我自己可能做错了什么就会很棒。
<div align ="center">
<h3>Create Your Project</h3>
<%= simple_form_for @createproject, :url => createprojects_url :html => {:class => 'form-horizontal'} do |f| %>
<%= f.input :name, :required => true %>
<%= f.input :email, :required => true %>
<%= f.input :tripdates, :required => true %>
<%= f.input :teamname, :required => true %>
<%= f.input :teamleader, :required => true %>
<%= f.input :tree, as: :check_boxes %>
<%= f.input :solar, as: :check_boxes %>
<%= f.input :water, as: :check_boxes %>
<%= f.input :goats, as: :check_boxes %>
<%= f.input :kids, as: :check_boxes %>
<%= f.input :house, as: :check_boxes %>
<%= f.input :roof, as: :check_boxes %>
<%= f.input :latrine, as: :check_boxes %>
<%= f.input :build, as: :check_boxes %>
<% f.button :submit %>
<% end %>
</div>
答案 0 :(得分:1)
你错过了一个逗号simple_form_for @createproject,:url =&gt; createprojects_url,:html =&GT; {:class =&gt; 'form-horizontal'} do | f |