If You Want It, It Probably Exists
May 2nd, 2007
I had the need to highlight some words in some text. I started digging for a plugin to do this and then just some ruby code. Then I finally typed ‘highlight’ into gotapi.com and found this function in ActionView::Helpers::TextHelper:
highlight(text, phrase, highlighter = '\1')
The lesson I learned (again) was to always check the docs first!
Leave a Reply