Upload
junghyun-park
View
81
Download
0
Embed Size (px)
Citation preview
CRUD 기능이 탑재된 API 서버
모든 유저 정보: [GET] ‘/users’특정 유저 정보: [GET] ‘/users/:id’새로운 유저 만들기: [POST] ‘/users’특정 유저 수정: [PATCH] ‘/users/:id’특정 유저 삭제: [DELETE] ‘/users/:id’
https://railscrudapi.herokuapp.com
시나리오
1) 유저 옆에 삭제 버튼 생성
2) 버튼 눌렀을 때 삭제하는 함수 만들기*유저 삭제 땐 뭐가 필요하더라? User의 Id
해당 User의 Id를 어떻게 함수로 넘길 수 있을까?
3) 삭제 누르면 새로 모든 user 리스트를 가져옴
https://github.com/Rocket-Hyun/__RailsAPI__Basic-CRUD
레일즈 깃헙
2인 1조 해서 코드 이해
클론 받아서app/controllers/users_controller.rb 파일 확인