Skip to content

WDI-HoneyBadger/w10d05-lab-music-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails Relationships Lab

This morning we set up an api for Artists and their Albums. Your job now is to add Songs.

In this directory you are given the app we made this morning, as well as some new seeds.

Your song model should have a title, a duration, and belong to an album.

HINT: How do we generate our Song model so it relates to our Album? What do we need to add to our models so they relate?

The routes for your songs should be:

method route action
GET /albums/:id/songs songs#index
POST /albums/:id/songs songs#create
GET /songs/:id songs#show
PUT /songs/:id songs#update
DELETE /songs/:id songs#destroy
GET /songs songs#index

HINT: Think about how we can use shallow routes!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published