We're going to use our product/order system and enhance it so that customers can browse the product catalog without refreshing the page.
You'll be modifying and building on the code from the previous lab, which is provided.
ProductSerializer
that serializes all of a product's
attributes (name
, price
, inventory
and description
) to JSON./products/:id/data
that returns a
JSON-serialized product
.show
page and route. Add a link to the products show
page called "Next Product" that
will use AJAX to load the data for the next product without refreshing the page.Note: The test suite makes use of selenium-webdriver
to test the
AJAX-enabled pages. You will need to have Firefox installed for the
tests to pass.