-
-
Save leejarvis/6327722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= simple_form_for @machine_visit_form do |f| | |
= f.error_notification | |
= f.input :refill_id, as: :hidden | |
= f.input :refill_date, as: :date | |
= f.input :refill_counter, as: :decimal, input_html: {value: number_with_precision(f.object.refill_counter, precision: 2) } | |
= f.fields_for :refill_line_items do |ff| | |
.well | |
= "#{ff.object.product_name}" | |
= ff.select :product, options_from_collection_for_select(Product.all, "id", "name") | |
= ff.number_field :quantity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="well"> | |
No Product<input id="refill_refill_line_item_id" name= | |
"refill[refill_line_item][id]" type="hidden" /><select id= | |
"refill_refill_line_item_product" name="refill[refill_line_item][product]"> | |
<option value="1"> | |
Mars Bar | |
</option> | |
</select><input id="refill_refill_line_item_quantity" name= | |
"refill[refill_line_item][quantity]" type="number" /> | |
</div> | |
<div class="well"> | |
No Product<input id="refill_refill_line_item_id" name= | |
"refill[refill_line_item][id]" type="hidden" /><select id= | |
"refill_refill_line_item_product" name="refill[refill_line_item][product]"> | |
<option value="1"> | |
Mars Bar | |
</option> | |
</select><input id="refill_refill_line_item_quantity" name= | |
"refill[refill_line_item][quantity]" type="number" /> | |
</div> | |
<div class="well"> | |
No Product<input id="refill_refill_line_item_id" name= | |
"refill[refill_line_item][id]" type="hidden" /><select id= | |
"refill_refill_line_item_product" name="refill[refill_line_item][product]"> | |
<option value="1"> | |
Mars Bar | |
</option> | |
</select><input id="refill_refill_line_item_quantity" name= | |
"refill[refill_line_item][quantity]" type="number" /> | |
</div><input class="btn btn-primary" name="commit" type="submit" value= | |
"Create Refill" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment