aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2015-01-10 16:57:15 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2015-01-10 16:57:15 -0500
commit2ee2072bbaa3a3694cca8edd4e02cc90e175fc1e (patch)
tree0d9fd3b4e5d723f14072922f7e9bf5eccd740b94 /activerecord/lib
parent134abedf198423e6b13d5582719bd9daabbbfa5a (diff)
parent0f931f2ff037a4e623473decad1482721af0cbc5 (diff)
downloadrails-2ee2072bbaa3a3694cca8edd4e02cc90e175fc1e.tar.gz
rails-2ee2072bbaa3a3694cca8edd4e02cc90e175fc1e.tar.bz2
rails-2ee2072bbaa3a3694cca8edd4e02cc90e175fc1e.zip
Merge pull request #18440 from robertomiranda/patch-3
Fix Typo SecureToken [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/secure_token.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/secure_token.rb b/activerecord/lib/active_record/secure_token.rb
index b1a13fe673..be3c3bc847 100644
--- a/activerecord/lib/active_record/secure_token.rb
+++ b/activerecord/lib/active_record/secure_token.rb
@@ -24,7 +24,7 @@ module ActiveRecord
# 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) }