Skip to content

Commit

Permalink
Merge pull request #1087 from eMxyzptlk/patch-2
Browse files Browse the repository at this point in the history
Rails has removed SecureRandom from ActiveSupport in Rails 3.2, deprecated
  • Loading branch information
josevalim committed May 24, 2011
2 parents 2e61e52 + 4c8cc5e commit acd1c76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/devise.rb
Expand Up @@ -3,6 +3,7 @@
require 'active_support/dependencies'
require 'orm_adapter'
require 'set'
require 'securerandom'

module Devise
autoload :FailureApp, 'devise/failure_app'
Expand Down Expand Up @@ -402,7 +403,7 @@ def self.configure_warden! #:nodoc:

# Generate a friendly string randomically to be used as token.
def self.friendly_token
ActiveSupport::SecureRandom.base64(15).tr('+/=', 'xyz')
SecureRandom.base64(15).tr('+/=', 'xyz')
end

# constant-time comparison algorithm to prevent timing attacks
Expand Down

0 comments on commit acd1c76

Please sign in to comment.