In the previous chapter, we laid out placeholder templates for our overall application layout and our sidebar. In this chapter, we will build out a search service which will allow us to search our blog pages by keyword. We’ll also work up some clever SQL to establish our dynamically generated archive list.
Search As a Service
We’ll start this chapter by first building a search service. Our search service will be a simple Ruby class that handles searching our page records and will live in between our Search controller and our Page model. We’re going to develop it as a service because it’s ...