ujh/fountainpencompanion

View on GitHub
app/views/collected_pens/_form.html.slim

Summary

Maintainability
Test Coverage
= simple_form_for pen do |f|
  div style="max-width: 450px"
    = f.input :brand, required: true, hint: "e.g. Pilot, Parker, Waterman"
  div style="max-width: 650px"
    = f.input :model, required: true, hint: "e.g. 51, Kakuno"
    = f.input :nib, hint: "e.g. M, B, architect <br /><br /><b>Tip:</b> If you change the nib, archived currently inked entries will not change. They always remember what nib was used when they were still active. This means, that you can change nibs around as often as you want and the system will keep track of it.".html_safe
    = f.input :color, hint: "e.g. blue with sparkles"
    = f.input :material, as: :string, hint: "e.g. ebonite, aluminium"
    = f.input :trim_color, as: :string, hint: "e.g. silver, gold, ruthenium"
    = f.input :filling_system, as: :string, hint: "e.g. piston filler, vac filler"
    = f.input :price, as: :string, hint: "e.g. 1 million dollars!"

  div style="max-width: 850px"
    = f.input :comment, hint: "Anything that doesn't fit into dedicated columns goes here."

  div class="pt-2 mb-5"
    = f.submit 'Save', class: "btn btn-success"
    = link_to 'Cancel', collected_pens_path, class: "btn btn-secondary"