Sha256: 46828d71f9dc019ad511345cdc6932fadd9556f367f419ab544f63f5ea2b2727

Contents?: true

Size: 685 Bytes

Versions: 3

Compression:

Stored size: 685 Bytes

Contents

<%= form_for(@thing) do |f| %>
  <% if @thing.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@thing.errors.count, "error") %> prohibited this thing from being saved:</h2>

      <ul>
      <% @thing.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :price %><br>
    <%= f.text_field :price %>
  </div>
  <div class="field">
    <%= f.label :qty %><br>
    <%= f.number_field :qty %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_cart-0.0.5 spec/dummy/app/views/things/_form.html.erb
simple_cart-0.0.4 spec/dummy/app/views/things/_form.html.erb
simple_cart-0.0.3 test/dummy/app/views/things/_form.html.erb