diff app/controllers/pastes_controller.rb @ 67:f7b7a39fb48c

Allow post in txt format pt. 2 (view and controller).
author Edho Arief <edho@myconan.net>
date Thu, 04 Oct 2012 10:20:58 +0700
parents 817c54a72b58
children be561c3967ee
line wrap: on
line diff
--- a/app/controllers/pastes_controller.rb	Thu Oct 04 10:20:19 2012 +0700
+++ b/app/controllers/pastes_controller.rb	Thu Oct 04 10:20:58 2012 +0700
@@ -47,6 +47,7 @@
           format.html { render :action => "new" }
           format.json { render :json => @paste.errors, :status => :unprocessable_entity }
         end
+        format.txt
       end
     rescue ActiveRecord::RecordNotUnique
       redirect_to paste_path(Paste.where(:ip => @paste.ip, :paste_hash => @paste.paste_hash).first)