how to ignore case in highlight() function? -- Posted via http://www.ruby-forum.com/.
Joao Silva wrote:> how to ignore case in highlight() function?Rails uses /i on when creating the Regexp for matching in the highlight method, this makes the regular expression ignore case. So it seems it already behaves as you want. http://github.com/rails/rails/blob/a147becfb86b689ab25e92edcfbb4bcc04108099/actionpack/lib/action_view/helpers/text_helper.rb#L110 Best, Michael Guterl -- Posted via http://www.ruby-forum.com/.