Created
December 28, 2020 12:53
-
-
Save dipak-tntra/4d524a858bba6ed03313c79109345151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_with(model: upload_csv, local: true) do |form| %> | |
<% if upload_csv.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(upload_csv.errors.count, "error") %> prohibited this upload_csv from being saved:</h2> | |
<ul> | |
<% upload_csv.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="field"> | |
<%= form.label :csv_file %> | |
<%= form.file_field :csv_file %> | |
</div> | |
<div class="actions"> | |
<%= form.submit %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment