Cart Exploration
The goal of this exercise is to explore the idea of building a shopping cart in Rails.
This Exploration will require that you do a lot more independent (or group) research into the topic than previous explorations.
To get started, find and review some recent blog posts about “rails 5 shopping cart best practices”.
###
Using the main code-along project in Mod 2 (ie, Set List, Bad Tracks, Jukebox, etc), implement tests and code that will satisfy the following user story:
As an unregistered user,
When I visit the song index
I see a link to “Add to Cart” next to each song.
When I click on “Add to Cart” on the first song
Then the resulting page shows a flash message saying “Added Song to Cart”
And I click a link on the page to "View Cart"
And I see a list of all songs I have added to my cart.
You Cannot:
- Save cart to database
You Can:
- Use Sessions
BOSS MODE:
- extract cart to a Plain Old Ruby Object (PORO)
Handing in your work
To get credit for handing in your work on time:
- Make a branch for your new work
- Commit your code locally and push your branch to your GitHub repo
- DO NOT MERGE THIS BRANCH!! (we’ll be going over this in a future class!!!)
- Look at the Branches tab for your repo and click on the branch name (the uri will look like https://github.com/yourusername/your-repo-name/tree/your-branch-name
- Send the URL of your branch to your instructors via Slack DM