From 0196551e6039ca864d1eee1e01819fcae12c1dc9 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 29 Jul 2019 14:23:10 +0900 Subject: Use match? where we don't need MatchData --- actiontext/lib/action_text/attachables/remote_image.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actiontext/lib/action_text/attachables/remote_image.rb') diff --git a/actiontext/lib/action_text/attachables/remote_image.rb b/actiontext/lib/action_text/attachables/remote_image.rb index 650b11862b..c5819ef1f5 100644 --- a/actiontext/lib/action_text/attachables/remote_image.rb +++ b/actiontext/lib/action_text/attachables/remote_image.rb @@ -14,7 +14,7 @@ module ActionText private def content_type_is_image?(content_type) - content_type.to_s =~ /^image(\/.+|$)/ + content_type.to_s.match?(/^image(\/.+|$)/) end def attributes_from_node(node) -- cgit v1.2.3