有<%= @requirement.errors.count %>个错误:
<% errors = "" %> <% @requirement.errors.messages.values.each_with_index { |message, index| errors = errors + "#{index+1}.#{message.join(";")}; " } %> <%= errors %>条件新增/修改
<%= f.text_field :name, class: "form-control", placeholder: "name" %>
<%= f.text_field :sql_key, class: "form-control", placeholder: "sql_key" %>
<%= f.text_field :sql_default, class: "form-control", placeholder: "当用户输入空值时,要替换的sql。" %>当用户输入空值时,要替换的sql。
<%= f.text_field :sql_replace, class: "form-control", placeholder: "当用户输入空值时,sql替换成。" %>当用户输入空值时,sql替换成。
<%= f.select :form_type, options_for_select(Requirement.form_type_options, @requirement.form_type), {}, class: "form-control" %>
<%= f.select :sql_type, options_for_select(Requirement.sql_type_options, @requirement.sql_type), {}, class: "form-control" %>
<%= f.text_area :sql_str, class: "form-control", placeholder: "sql_str" %>