Question

I have to pass the value of an input field to another page where it will add this value to the database.

The code looks like this

    .shoping_cart_col2
      %input.cart_box{:type => "text", :value => "1"}/
    .shoping_cart_col3 
      = button_to "Add To Cart" , line_items_path(:product_id => @prod)

When i press the "Add to Cart" button i want the value of cart_box to be submitted to the next page with it, this value will be passed to the next page as :quantity

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top