short ids in urls should be case insensitive, so make them that way anyway

This commit is contained in:
joshua stein 2012-07-12 15:51:57 -05:00
parent 33e6eee4e0
commit 70db7a5879
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ class Comment < ActiveRecord::Base
raise "too many hash collisions"
end
self.short_id = Utils.random_str(6)
self.short_id = Utils.random_str(6).downcase
if !Comment.find_by_short_id(self.short_id)
break

View file

@ -90,7 +90,7 @@ class Story < ActiveRecord::Base
raise "too many hash collisions"
end
self.short_id = Utils.random_str(6)
self.short_id = Utils.random_str(6).downcase
if !Story.find_by_short_id(self.short_id)
break