-
-
Save shankardevy/e4fb375c78a0c9879260ca43af745aa8 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
<%= form_for @conn, "/cart", [class: "cart-form form-inline", as: :cart], fn f -> %> | |
<div class="form-group"> | |
<div class="input-group"> | |
<%= hidden_input f, :product_name, value: @product.name %> | |
<%= hidden_input f, :pack_size, value: @product.pack_size %> | |
<%= hidden_input f, :product_id, value: @product.id %> | |
<div class="input-group-addon">Qty</div> | |
<%= number_input f, :quantity, value: 1, class: "form-control", style: "width: 70px" %> | |
</div> | |
<%= error_tag f, :quantity %> | |
</div> | |
<%= submit "Add to cart", class: "btn btn-primary pull-right" %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment