about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorRenato "Lond" Cerqueira <renato@lond.com.br>2018-07-03 19:47:09 +0200
committerEugen Rochko <eugen@zeonfederated.com>2018-07-03 19:47:09 +0200
commit4045b50bd6f6194f41384c2426bd9b17831b1438 (patch)
tree905504f95b67d2dc1c567079036e21038f1f281c /app/models/concerns
parentbbbe3ed6baec5758704ceda31f50182bcccea86c (diff)
Restore support to ruby 2.3, add ruby 2.3 to circle ci (#7935)
This replace calls of String#match? with rails Regex#match?
This follows the same idea used to keep Rails 5.2 compatible with Ruby
2.2.2 in https://github.com/rails/rails/pull/32973
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/attachmentable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/attachmentable.rb b/app/models/concerns/attachmentable.rb
index 44bdfa39a..de4cf8775 100644
--- a/app/models/concerns/attachmentable.rb
+++ b/app/models/concerns/attachmentable.rb
@@ -28,7 +28,7 @@ module Attachmentable
     self.class.attachment_definitions.each_key do |attachment_name|
       attachment = send(attachment_name)
 
-      next if attachment.blank? || !attachment.content_type.match?(/image.*/) || attachment.queued_for_write[:original].blank?
+      next if attachment.blank? || !/image.*/.match?(attachment.content_type) || attachment.queued_for_write[:original].blank?
 
       width, height = FastImage.size(attachment.queued_for_write[:original].path)