Finish routes for projects
This commit is contained in:
21
app/views/projects/_form.html.erb
Normal file
21
app/views/projects/_form.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<%= form_with model: project do |f| %>
|
||||
<% if project.errors.any? %>
|
||||
<div class="errors">
|
||||
<h2><%= pluralize(project.errors.count, "error") %> prohibited this project from being saved:</h2>
|
||||
<ul>
|
||||
<% project.errors.full_messages.each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user