Open neeklamy opened 8 years ago
We’re told about the http://localhost:3000/api/books.json URL on page 25, Adding some seed data, and to spin up the Rails server and check out the URL, but, we haven’t added the api route to routes.rb yet.
api
routes.rb
Happily, http://localhost:3000/books.json works without any modification.
Page 26 has another mention of this URL when we’ve uploaded to Heroku (Heroku prints out a JSON formatted error, nice).
You should add this to the route file:
scope '/api' do resources :books end
We’re told about the http://localhost:3000/api/books.json URL on page 25, Adding some seed data, and to spin up the Rails server and check out the URL, but, we haven’t added the
api
route toroutes.rb
yet.Happily, http://localhost:3000/books.json works without any modification.
Page 26 has another mention of this URL when we’ve uploaded to Heroku (Heroku prints out a JSON formatted error, nice).