<%= form_for(@customer) do |f| %> <% if @customer.errors.any? %>

<%= pluralize(@customer.errors.count, "error") %> prohibited this customer from being saved:

<% end %>
<%= f.fields_for :transactions, @transaction do |trans| %>

物件名

<%= trans.text_field :name %>

開始日

<%= trans.date_field :start %>

終了日

<%= trans.date_field :expire %>

契約種別

<%= trans.text_field :payment %>

支払日

<%= trans.text_field :payday %>

月額

<%= trans.text_field :amount %>

総額

<%= trans.text_field :amount_all %>

注釈

<%= trans.text_field :detail %>
<% if @uploaded_file %> <% @uploaded_file.each do |files| %>
<%= link_to '削除', files, method: :delete, data:{confirm: '本当に削除しますか?'}, class: "w8-button l-blue small"%> <% end %> <% end %> <% if @uploading_file %> <% @uploading_file.each do |content| %> <%= trans.fields_for :contents, content do |c| %>
<%= c.file_field :upload_file, class: "file" %> <% end %> <% end %> <% end %> <% end %>
<%= f.submit "更新", :name => "trans_update", class: "w8-button l-blue normal" %>
<% end %>