I was trying to highlight more than 1 term in a text with highlight
method from TextHelper. Much to my surprise, I just copied the example
from Rdoc (http://api.rubyonrails.org/classes/ActionView/Helpers/
TextHelper.html#M001050): highlight(‘You searched for: rails’,
[‘for’, ‘rails’], ‘\1’)
But I get TypeError.
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/
helpers/text_helper.rb:48:in escape' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_view/ helpers/text_helper.rb:48:in
highlight’
Then I updated to Rails 2.0.2 (gem update rails -y ). But still
doesn’t work. On the two lines above, the path
is …actionpack-1.13.6 … what do I need to do to work with
actionpack 2.0.2?
I’m working with netbeans for win XP
Thanks in advance,
Paulo P.