tap/app/views/products/_form.html.erb
2014-12-09 14:39:27 +01:00

18 lines
541 B
Plaintext

<div class="row">
<div class="col-md-6 col-md-offset-3">
<%= form_for @product, html: { multipart: true } do |f| %>
<%= render 'application/errors', model: @product %>
<%= form_text_field f, :name %>
<%= f.label :price %>
<%= f.number_field :price, value: number_with_precision(f.object.price, precision: 2), class: 'form-control', placeholder: "0.00", step: :any %>
<%= f.label :avatar %>
<%= f.file_field :avatar %>
<%= f.submit class: "btn btn-primary" %>
<% end %>
</div>
</div>