Hotwired wi[
This commit is contained in:
23
app/views/hello/_form.html.erb
Normal file
23
app/views/hello/_form.html.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
<%= form_with(model: employer, id: dom_id(employer)) do |form| %>
|
||||
<% if employer.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(employer.errors.count, "error") %> prohibited this employer from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% tweet.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= form.label :name %>
|
||||
<%= form.text_area :name %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= form.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user