aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
diff options
context:
space:
mode:
authorLucas Mazza <lucastmazza@gmail.com>2014-06-19 14:58:36 -0300
committerLucas Mazza <lucastmazza@gmail.com>2014-06-19 15:22:23 -0300
commit9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630 (patch)
tree9b0b6c8cb68a524de923aaa974b6da4e580b4b06 /actionview/CHANGELOG.md
parent490f25034d62817f9315084ddc0506ff6bc65055 (diff)
downloadrails-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/CHANGELOG.md')
-rw-r--r--actionview/CHANGELOG.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index d825d3b627..03ac155848 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,12 @@
+* The `highlight` helper now accepts a block to be used instead of the `highlighter`
+ option.
+
+ *Lucas Mazza*
+
+* The `except` and `highlight` helpers now accept regular expressions.
+
+ *Jan Szumiec*
+
* Flatten the array parameter in `safe_join`, so it behaves consistently with
`Array#join`.