why clearing temp file is still needed ?

40 views
Skip to first unread message

erwin

unread,
Feb 16, 2012, 5:43:22 PM2/16/12
to Paperclip Plugin
Is it a version issue ? I installed the latest gem and using it w
Rails 3.2.1 / Ruby 1.9.3

in dev mode (on localhost .. not tested in production w
Passenger;.) , it seems I still need to clear the temp file in my
action code.... wo this line it crashes w the usual error "Can't dump
file" upon the redirect ... with the line it runs well..

thanks for your feedback

def change_avatar
@partner = Partner.find(params[:id])
@partner.update_attributes(:avatar => params[:partner][:avatar])
params[:partner][:avatar].tempfile = nil unless params[:partner]
[:avatar].tempfile.nil?
redirect_to backoffice_partner_url(@partner)
end
Reply all
Reply to author
Forward
0 new messages