concept Searcher in category rails
appears as: Searcher

This is an excerpt from Manning's book Rails 3 in Action.
The :from option tells Searcher what association this label should be searched upon, and the :field option tells it what field to perform a lookup on.
The label method is evaluated internally to Searcher and will result in a by_tag method being defined on your Ticket model, which will be used by the search method if you pass in a query such as tag:iteration_1. This method will perform an SQL join on your tags table, returning only the tickets that are related to a tag with the given name.
git add . git commit -m "Added label-based searching for tags using Searcher" git push