I’m just upgrading an app from acts_as_attachment to attachment_fu and
run into an issue using the with_image method on existing attachment
It worked fine in acts_as_attachment but in attachment_fu it simply does
work at all, ruby actually hangs. It’s not too surprising really, since
internally a blank string has been passed to Magick::Image.read instead
an actual file to load. The with_image method assumes that a temporary
is present, which it would be when the uploaded data has just been
but not when working with a previously saved record.
A little patch to the plugin can fix it but it doesn’t seem like the
def with_image(&block) # Write out the temporary data if it is not present if temp_data.nil? self.temp_data = current_data end self.class.with_image(temp_path, &block) end
Anybody else had this problem?