]> cat aescling's git repositories - mastodon.git/commitdiff
Fix Paperclip timeout setting. Fix bug introduced in #437
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 8 Jan 2017 18:12:54 +0000 (19:12 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 8 Jan 2017 18:12:54 +0000 (19:12 +0100)
app/models/account.rb
config/initializers/paperclip.rb

index 3a7763a64526c9c79d9d2fc5a1af3157b4c96119..ba24cf15309c24dde85fb7c3d8fbbfb953a41226 100644 (file)
@@ -190,8 +190,10 @@ class Account < ApplicationRecord
       follow_mapping(FollowRequest.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id)
     end
     
-    private def follow_mapping(query, field)
-      query.pluck(field).inject({}) { |mapping, id| mapping[id] = true }
+    private
+
+    def follow_mapping(query, field)
+      query.pluck(field).inject({}) { |mapping, id| mapping[id] = true; mapping }
     end
   end
 
index 4d61545622c9bb0d97712096518b06e6612fcd81..999ff47c74be1da3434f327b69ced878df45deab 100644 (file)
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-Paperclip::Attachment.default_options[:read_timeout] = 60
+Paperclip.options[:read_timeout] = 60
 
 if ENV['S3_ENABLED'] == 'true'
   Aws.eager_autoload!(services: %w(S3))