How to highlight the search term in the search result

In the ‘basecamp’ product from 37signals if I search for ‘ruby’ the I
get a
bunch of results. In the search result page the search term (ruby in
this
case) is highlighted.

I was wondering how to accomplish the same.

How to highlight the ‘search term’ in the search result? Is there any
already existing utility that I could use?

Thanks.

Neeraj K. <neeraj.jsr@…> writes:

In the ‘basecamp’ product from 37signals if I search for ‘ruby’ the I get a
bunch of results. In the search result page the search term (ruby in
this case)
is highlighted.I was wondering how to accomplish the same.
How to highlight the ‘search term’ in the search result? Is there any already
existing utility that I could use?Thanks.


Rails mailing list
Rails@…
http://lists.rubyonrails.org/mailman/listinfo/rails

Search the API doc (ActionView) for the “highlight” method