diff options
author | igor04 <igor.s04g@gmail.com> | 2014-09-30 14:48:48 +0300 |
---|---|---|
committer | igor04 <igor.s04g@gmail.com> | 2014-09-30 14:48:48 +0300 |
commit | 0e50b7bdf4c0f789db37e22dc45c52b082f674b4 (patch) | |
tree | ef51bfae7d593ab269f00d3618f07df1387d13d5 /actionview/lib | |
parent | 79c491e838f83b027b093242cdaf22f47935c258 (diff) | |
download | rails-0e50b7bdf4c0f789db37e22dc45c52b082f674b4.tar.gz rails-0e50b7bdf4c0f789db37e22dc45c52b082f674b4.tar.bz2 rails-0e50b7bdf4c0f789db37e22dc45c52b082f674b4.zip |
Added processing of `nil` to `highlight` helper method
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/text_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |