Mercurial > zeropaste
diff app/models/paste.rb @ 428:9fc6b919369c
Whoops, broken the very basic thing
Added test.
author | nanaya <me@myconan.net> |
---|---|
date | Sun, 15 Nov 2015 15:10:01 +0900 |
parents | 9369ad2f2ce8 |
children | 68eb23b52864 |
line wrap: on
line diff
--- a/app/models/paste.rb Sat Nov 14 20:43:49 2015 +0900 +++ b/app/models/paste.rb Sun Nov 15 15:10:01 2015 +0900 @@ -17,7 +17,7 @@ def self.safe_find(raw_id) /\A(?<id>[0-9]+)(?:-(?<secret>[0-9a-f]+))?\z/ =~ raw_id.to_s - where(:secret => secret, :id => id) + where(:secret => secret, :id => id).take end def self.graceful_create(params)