diff options
author | Lucas Mazza <lucastmazza@gmail.com> | 2014-06-19 14:58:36 -0300 |
---|---|---|
committer | Lucas Mazza <lucastmazza@gmail.com> | 2014-06-19 15:22:23 -0300 |
commit | 9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630 (patch) | |
tree | 9b0b6c8cb68a524de923aaa974b6da4e580b4b06 /actionview/lib/action_view/helpers/tags/tel_field.rb | |
parent | 490f25034d62817f9315084ddc0506ff6bc65055 (diff) | |
download | rails-9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630.tar.gz rails-9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630.tar.bz2 rails-9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630.zip |
'TextHelper#highlight' now accepts a block to highlight the matched words.
The helper will yield each matched word, and you can use this instead of the
':highlighter' option for more complex replacing logic:
highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) }
# => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/tel_field.rb')
0 files changed, 0 insertions, 0 deletions