app/views/projects/_modal_edit.html.erb
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">×</span></button>
<%= render 'layouts/error_message', { form: @project} %>
<% if @project.id.present? %>
<h4 class="modal-title"><%= t("default.update")+":"+@project.name %></h4>
<% else %>
<h4 class="modal-title"><%= t "project.index.new_project" %></h4>
<% end %>
</div>
<%= form_for @project, remote: true do |f| %>
<div class="modal-body">
<div class="form-group">
<%= f.label :name%>
<%= f.text_field :name, class: 'form-control',placeholder: "project name"%>
</div>
<div class="form-group">
<%= f.label :memo%>
<%= f.text_area :memo, class: 'form-control',placeholder: "memo"%>
</div>
</div>
<div class="modal-footer">
<%= f.submit t("default.submit") %>
<%= button_tag t("default.cancel"), {'type' => 'button','data-dismiss' => 'modal' } %>
<% end %>
</div>
</div>
</div>