On Aug 31, 12:51 pm, Alexander Gitter <[email protected]> wrote:
> I have a similar problem. Until now I used to assign a > ActionDispatch::Http::UploadedFile to my parameter, which now doesn't > work anymore in rails 3.1. > > Unfortunately I cannot use fixture_file_upload because it creates a > Rack::Test::UploadedFile, which doesn't provide #tempfile: > > irb> params[:file].class > => Rack::Test::UploadedFile > irb> params[:file].tempfile > NoMethodError: undefined method `tempfile' for #<Tempfile:0xb6591b70> > It doesn't have a tempfile method but it does actually wrap a Tempfile and has a @tempfile instance variable. In the past I've reopened Rack::Test::UploadedFile to add a tempfile method Fred > There already is a bug report about this problem with > fixture_file_upload:https://github.com/rails/rails/issues/799 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

