Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 560 Bytes

api.md

File metadata and controls

22 lines (16 loc) · 560 Bytes

Rails API

rails new my_albums --api --skip-action-cable --skip-sprockets
cd my_albums
bundle
rails g scaffold Album title:string released:string
rake db:migrate

Insert some data:

curl -X POST localhost:3000/albums -H "Content-Type: application/json" \
  --data '{"title":"Houses Of The Holy","released":"March 28, 1973"}'

More examples