I saw this code in agile rails development code
line_items_path(:product_id => product)
and is not able to figure out how it is working. I can see it is used for adding products to cart but how does this _path function works here ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can find where line_item_path point to in config/route.rb
:product_id it’s a params then you can read at function specified from line_item_path