Skip to content

Commit df9f2c3

Browse files
Set Paperclip Attachment's options properly (#1635)
Rails 5 doesn't seem to play well with initializers setting the Rails.application.config settings for Paperclip, so we now do it the suggested way. See thoughtbot/paperclip#2240
1 parent 8d4dbdf commit df9f2c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/initializers/paperclip_defaults.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
s3_protocol: 'https',
1111
}
1212
paperclip_defaults[:s3_host_name] = ENV['PAPERCLIP_S3_HOST_NAME'].presence
13-
Rails.application.config.paperclip_defaults = paperclip_defaults
13+
Paperclip::Attachment.default_options.update(paperclip_defaults)
1414
end
1515

1616
Paperclip.options[:content_type_mappings] = {

0 commit comments

Comments
 (0)