From 0e50b7bdf4c0f789db37e22dc45c52b082f674b4 Mon Sep 17 00:00:00 2001 From: igor04 Date: Tue, 30 Sep 2014 14:48:48 +0300 Subject: Added processing of `nil` to `highlight` helper method --- actionview/lib/action_view/helpers/text_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/lib/action_view') diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index b859653bc9..a9f1631586 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -126,7 +126,7 @@ module ActionView text = sanitize(text) if options.fetch(:sanitize, true) if text.blank? || phrases.blank? - text + text || "" else match = Array(phrases).map do |p| Regexp === p ? p.to_s : Regexp.escape(p) -- cgit v1.2.3