In this second part of a three-part series on building an online book catalog in Ruby-on-Rails, you'll learn how to set up the application to allow users to view book details and search for books. This article is excerpted from chapter four of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).
Browsing and Searching an Online Book Catalog - Adding Links (Page 2 of 4 )
Now that we have pages for individual books, it would be a good idea to link to them from the catalog list page. Letís make sure that a link exists for each book on the catalog/index page. We create a separate method for checking the links, and then call that method from both the browse_indexandgo_to_second_pagemethods. Add the following new method and calls for it to theBrowsingTestDSLmodule intest/integration/browsing_and_searching_test.rb: