# HG changeset patch # User edogawaconan # Date 1381379107 0 # Node ID 9aa67da381b0d96777d288c2bd57a927c1fd6160 # Parent 8ab17063419fafd79fd12a7a30710a85d258f7a5 Make sure to split a string. diff -r 8ab17063419f -r 9aa67da381b0 app/models/paste.rb --- a/app/models/paste.rb Mon Oct 07 04:18:17 2013 +0000 +++ b/app/models/paste.rb Thu Oct 10 04:25:07 2013 +0000 @@ -13,7 +13,7 @@ end def self.safe_find(raw_id) - id, secret = raw_id.split("-") + id, secret = raw_id.to_s.split("-") return unless id.to_i.to_s == id begin self.where(secret: secret).find(id)