Mercurial > zeropaste
changeset 151:db5164ff73a9
Always fill in @paste.ip when creating new one.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 26 Nov 2012 21:53:12 +0700 |
parents | 88f957e0352b |
children | c9dc1eeeea9a |
files | app/controllers/pastes_controller.rb |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb Mon Nov 26 21:52:43 2012 +0700 +++ b/app/controllers/pastes_controller.rb Mon Nov 26 21:53:12 2012 +0700 @@ -36,6 +36,7 @@ # POST /pastes.txt def create @paste = Paste.new + @paste.ip = request.remote_ip if params[:paste] if params[:paste][:paste_gzip_base64] # 1. decode from base64 @@ -45,7 +46,6 @@ end unless params[:paste][:paste].blank? @paste.paste = params[:paste][:paste] - @paste.ip = request.remote_ip end end