Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_with(model: product, local: true) do |form| %>
- <% if product.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(product.errors.count, "error") %> prohibited this product from being saved:</h2>
- <ul>
- <% product.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= form.label :name %>
- <%= form.text_field :name %>
- </div>
- <div class="field">
- <%= form.label :description %>
- <%= form.text_area :description %>
- </div>
- <div class="field">
- <%= form.label :image_url %>
- <%= form.text_field :image_url %>
- </div>
- <div class="field">
- <%= form.label :color %><br>
- <%= form.text_field :color %>
- </div>
- <div class="actions">
- <%= form.submit %>
- </div>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement