5.6. Summary

Rails has a number of facilities, both built-in and via plugin, for supporting navigation and information architecture of your application. It's straightforward to build a sidebar using some basic Ruby data structures and the Rails helper method link_to_unless_current.

Tagging is a very popular way to allow flexible and user-centric organization. In Rails, the recommended way of managing tagging is via the Acts As Taggable On Steroids (AATOS) plugin, which creates an ActiveRecord structure for associating tags with any ActiveRecord object. The plugin manages the basic data association, and you can easily add more complex calculations to display tag clouds or other fancy representations of your tags.

Search can be handled on your site via pure SQL, which is simple but does not allow for easy inclusion of Boolean logic or weighted queries. MySQL has such a facility, but it's not portable between databases. The Ferret gem and the Rails plugin Acts As Ferret can be used to add full-text indexing and searching to your site.

Pagination was removed from the Rails 2.0 core, but two simple plugins offer similar functionality to add pagination to your application: will_paginate and paginating_find.

Get Professional Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.