roberto/lentlist

View on GitHub
app/views/items/_form.html.erb

Summary

Maintainability
Test Coverage
<%= simple_form_for item, html: { class: 'form-horizontal' } do |f| %>
  <fieldset>
    <legend><%= title %> Item</legend>
    <%= f.simple_fields_for :borrower do |borrower_form| %>
      <%= borrower_form.input :name, label: "I lent", placeholder: "John" %>
    <% end %>
    <%= f.input :title, label: "my", placeholder: 'Cookbook' %>

    <div class="form-actions">
      <%= f.submit nil, class: 'submit-button' %>
      <%= link_to 'Cancel', items_path, class: 'btn' %>
    </div>
  </fieldset>
<% end %>