How to make the Cart functionality to work in Rails

54 views
Skip to first unread message

Atchyut Nagabhairava

unread,
Mar 10, 2016, 10:54:59 AM3/10/16
to Ruby on Rails: Talk

I was practicing rails by creating a food ordering website some what similar to FoodPanda.
For now I have created pages to display restaurants, in restaurant profile to display menu items. I stuck up with a doubt how could I add the add to cart functionality button for a menu item.
I request some one to help me for its functionality.
Please find the screenshot attachment of the restaurant profile page with menu items. 
Thanks in Advance.

Walter Lee Davis

unread,
Mar 11, 2016, 9:06:38 AM3/11/16
to rubyonra...@googlegroups.com
Are you looking for design ideas, as in what models you will need and how to organize their associations and controllers? What have you tried so far in the direction of creating a cart?

Note that there are full-blown shopping carts out there (shopify have open-sourced theirs, I think, probably many others) but if you are learning, then making your own is a great exercise.

Try to narrow down your question a bit (and try something first), and someone here can help you.

Walter

> Thanks in Advance.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/79cbda69-4324-455e-98a9-aeabc7511660%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Atchyut Nagabhairava

unread,
Mar 11, 2016, 9:10:10 AM3/11/16
to Ruby on Rails: Talk
Thanks for your kind words Walter, I have finally created the cart functionality using a controller.
Thanks for the response :)

Elton Santos

unread,
Mar 17, 2016, 9:53:14 AM3/17/16
to Ruby on Rails: Talk
Can you post in github? I need learn too. Thanks!
Reply all
Reply to author
Forward
0 new messages