aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/translation_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/helpers/translation_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/translation_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb
index 152e1b1211..622bb193ae 100644
--- a/actionview/lib/action_view/helpers/translation_helper.rb
+++ b/actionview/lib/action_view/helpers/translation_helper.rb
@@ -1,5 +1,6 @@
require 'action_view/helpers/tag_helper'
require 'active_support/core_ext/string/access'
+require 'active_support/core_ext/regexp'
require 'i18n/exceptions'
module ActionView
@@ -133,7 +134,7 @@ module ActionView
end
def html_safe_translation_key?(key)
- key.to_s =~ /(\b|_|\.)html$/
+ /(\b|_|\.)html$/.match?(key.to_s)
end
end
end