diff options
Diffstat (limited to 'actionview/lib/action_view/helpers/text_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/text_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index fe365fafe1..cb812bd5ba 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -1,5 +1,5 @@ -require 'active_support/core_ext/string/filters' -require 'active_support/core_ext/array/extract_options' +require "active_support/core_ext/string/filters" +require "active_support/core_ext/array/extract_options" module ActionView # = Action View Text Helpers @@ -135,7 +135,7 @@ module ActionView else match = Array(phrases).map do |p| Regexp === p ? p.to_s : Regexp.escape(p) - end.join('|') + end.join("|") if block_given? text.gsub(/(#{match})(?![^<]*?>)/i) { |found| yield found } @@ -358,7 +358,7 @@ module ActionView # <% end %> def cycle(first_value, *values) options = values.extract_options! - name = options.fetch(:name, 'default') + name = options.fetch(:name, "default") values.unshift(*first_value) |