aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-06-08 13:00:29 +0100
committerFrancis Irving <francis@mysociety.org>2010-06-08 13:00:29 +0100
commitc0b96622c20ec8632de38e31e6fb6a5b62cfa6f6 (patch)
treeedadf0f7ac024e82e13ddaf0c011ffe8866b56d6 /app/models
parent942ce15a177392b42276d16dbe0c77805d975e8a (diff)
parent91ae176bc38ba2eaefad55ddaae8cb80de196b13 (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/whatdotheyknow
Diffstat (limited to 'app/models')
-rw-r--r--app/models/post_redirect.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb
index edd151730..655b3ac58 100644
--- a/app/models/post_redirect.rb
+++ b/app/models/post_redirect.rb
@@ -61,11 +61,7 @@ class PostRedirect < ActiveRecord::Base
# Makes a random token, suitable for using in URLs e.g confirmation messages.
def self.generate_random_token
- bits = 12 * 8
- # Make range from value to double value, so number of digits in base 36
- # encoding is quite long always.
- rand_num = rand(max = 2**(bits+1)) + 2**bits
- rand_num.to_s(base=36)
+ MySociety::Util.generate_token
end
# Make the token