Skip to content
This repository

Solved Rails 3.0.3 temp_file size problem. Maybe this needs a more solid fix #31

procommerz opened this Issue January 13, 2011 · 1 comment

2 participants

Denis risk danger olson

Here's the new Technoweenie::AttachmentFu::InstanceMethods.temp_path method code that nails down this problem:

def temp_path
    p = temp_paths.first

    if p.is_a?(ActionDispatch::Http::UploadedFile) # Rails 3.0.3 compatability fix
      p.respond_to?(:path) ? p.path : p.to_s

It appears, that attachment_fu expected temp_paths.first to be a File, but with Rails 3.0.3 it turns out to be an ctionDispatch::Http::UploadedFile, which is wrapped around a file and won't provide 'path' accessor directly.

risk danger olson

I don't use the plugin anymore. If you submit a pull request with a working fix, I'll gladly apply it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.