Permalink
Browse files

Merge pull request #18440 from robertomiranda/patch-3

Fix Typo SecureToken [ci skip]
  • Loading branch information...
guilleiguaran committed Jan 10, 2015
2 parents 134abed + 0f931f2 commit 2ee2072bbaa3a3694cca8edd4e02cc90e175fc1e
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/secure_token.rb
@@ -24,7 +24,7 @@ module ClassMethods
# validates_presence_of can. You're encouraged to add a unique index in the database to deal with
# this even more unlikely scenario.
def has_secure_token(attribute = :token)
# Load securerandom only when has_secure_key is used.
# Load securerandom only when has_secure_token is used.
require 'active_support/core_ext/securerandom'
define_method("regenerate_#{attribute}") { update! attribute => self.class.generate_unique_secure_token }
before_create { self.send("#{attribute}=", self.class.generate_unique_secure_token) }

0 comments on commit 2ee2072

Please sign in to comment.