系列新增/修改 系列新增/修改 manager

<% if @series.errors.any? %>

有<%= @series.errors.count %>个错误:

<% errors = "" %> <% @series.errors.messages.values.each_with_index { |message, index| errors = errors + "#{index+1}.#{message.join(";")}; " } %> <%= errors %>
<% end %>

系列新增/修改

<%= form_for(@series, url: (@series.id ? report_series_path(@report, @series) : report_series_index_path(@report)), :html => {:class => "form-horizontal", :id => "obj_form"}) do |f| %>
<%= f.text_field :name, class: "form-control", placeholder: "name" %>
<%= f.text_field :sql_key, class: "form-control", placeholder: "sql_key" %>
<% end %>
<%= content_for :js_bottom do %> <% end %>