0
0
Fork 0

Workaround the ActiveRecord / Marshal serialization bug on Ruby 3.2 (#24142)

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
This commit is contained in:
Jean byroot Boussier 2023-03-17 13:37:30 +00:00 committed by GitHub
parent b22b4bac03
commit 160f38f03d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 166 additions and 3 deletions

View file

@ -51,6 +51,12 @@ Rails.application.configure do
config.i18n.default_locale = :en
config.i18n.fallbacks = true
config.to_prepare do
# Force Status to always be SHAPE_TOO_COMPLEX
# Ref: https://github.com/mastodon/mastodon/issues/23644
10.times { |i| Status.allocate.instance_variable_set(:"@ivar_#{i}", nil) }
end
end
Paperclip::Attachment.default_options[:path] = "#{Rails.root}/spec/test_files/:class/:id_partition/:style.:extension"