I recently upgraded to Shrine 3 and it’s been mostly seamless with the exception of 1 hiccup.
I have one model that saves an incoming string as a file.
In Shrine2, I wrapped it in the following class and saved it like this
# frozen_string_literal: true class IOObject attr_accessor :string_io, :original_filename delegate :read, :rewind, :eof?, :close, :size, to: :string_io def initialize(string, filename) @string_io = StringIO.new(string) @original_filename = filename end end feed.uploaded_file = IOObject.new(csv, filename) feed.save
Previously, this worked fine, but now, intermittently, it will save an empty file when I know there was data there.
I’m looking to see if it could be something else, but the behavior only started after the gem upgrade and I want to make sure I haven’t missed something in the guide.