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. <[email protected]…> 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
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs