diff app/models/paste.rb @ 71:7bb46d9febad

Ensure we're gsubbing a string.
author Edho Arief <edho@myconan.net>
date Thu, 04 Oct 2012 10:38:55 +0700
parents 8f0fb869e770
children a9dba6a3008b
line wrap: on
line diff
--- a/app/models/paste.rb	Thu Oct 04 10:38:08 2012 +0700
+++ b/app/models/paste.rb	Thu Oct 04 10:38:55 2012 +0700
@@ -11,7 +11,7 @@
   end
 
   def convert_newlines
-    self.paste = self.paste.gsub("\r\n", "\n").gsub("\r", "\n")
+    self.paste = self.paste.to_s.gsub("\r\n", "\n").gsub("\r", "\n")
   end
 
   def paste_limit