I am working on a rails 3 app and have a shopping cart functionality. On the products page I have Items listed and "Add to Cart". the cart is also 开发者_JAVA技巧rendered on same page as a partial. Now I need functionality to put in a maximum amount allowed in a cart. I have a input box on that page for this. When I click checkout I need to compare the the total cart price against the maximum amount and display appropriate message. Where do (which controller action) I capture form value for the maximum amount?
It would be nice if you add some code. No one is gonna tell you that at least that you said what controllers uses for your shopping cart. Maybe you should add a action in your "shop" controller, and add your restful route in your routes file.
精彩评论