O'Reilly logo

RailsSpace: Building a Social Networking Website with Ruby on Rails™ by Aurelius Prochazka, Michael Hartl

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Searching and browsing

In principle, our alphabetical community index lets any user find any other user, but using it in this way would be terribly cumbersome. In this chapter, we add more convenient and powerful ways to find users. We begin by adding full-text search to RailsSpace by making use of an open-source project called Ferret. We then stalker-enable our site with browsing by age, sex, and location.

Adding search and browse capability to RailsSpace will involve the creation of custom pagination and validations, which means that we will start to rely less on the built-in Rails functions. This chapter also contains a surprising amount of geography, some fairly fancy finds, and even a little math.

11.1. Searching

Though it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required