Use SecureRandom instead of the deprecated ActiveSupport::SecureRandom

This commit is contained in:
Tom Hughes 2011-09-28 12:56:12 +01:00
parent fc25c3d412
commit 97b1290f1a

View file

@ -48,7 +48,7 @@ class UserController < ApplicationController
if params[:user] and params[:user][:openid_url] and @user.pass_crypt.empty?
# We are creating an account with OpenID and no password
# was specified so create a random one
@user.pass_crypt = ActiveSupport::SecureRandom.base64(16)
@user.pass_crypt = SecureRandom.base64(16)
@user.pass_crypt_confirmation = @user.pass_crypt
end