Mercurial > zeropaste
diff app/controllers/pastes_controller.rb @ 225:9998d8b6c524
Wrong usage of .delete
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 13 May 2013 13:19:13 +0900 |
parents | 186b4674bcbe |
children | fb9909885d63 |
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb Sun May 12 12:56:49 2013 +0900 +++ b/app/controllers/pastes_controller.rb Mon May 13 13:19:13 2013 +0900 @@ -35,7 +35,7 @@ # 1. decode from base64 # 2. create StringIO from decoded string # 3. unzip and read the stream - params[:paste][:paste] = Zlib::GzipReader.new(StringIO.new(Base64.decode64(params[:paste][:paste_gzip_base64].delete))).read + params[:paste][:paste] = Zlib::GzipReader.new(StringIO.new(Base64.decode64(params[:paste].delete(:paste_gzip_base64)))).read end @paste = Paste.new(paste_params.merge(ip: request.remote_ip))