From 9f27e1076ac6aacb33b0f4ee0e940c2a90f1c630 Mon Sep 17 00:00:00 2001 From: Lucas Mazza Date: Thu, 19 Jun 2014 14:58:36 -0300 Subject: '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 me@work.com' --- actionview/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionview/CHANGELOG.md') 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`. -- cgit v1.2.3