diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-09-21 05:16:19 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-09-21 05:16:19 +0000 |
commit | ca9c6bc25415fc5ad4f0a44daa4611ce143dfba6 (patch) | |
tree | cae9b9c2ddb29e153b29fafe88e458f267c7c0fe /app/models/token.rb | |
parent | 92403eb85506fbd71d62a62dca372b0dfa82d750 (diff) | |
download | redmine-ca9c6bc25415fc5ad4f0a44daa4611ce143dfba6.tar.gz redmine-ca9c6bc25415fc5ad4f0a44daa4611ce143dfba6.zip |
Rails3: model: replace deprecated 'before_create' method at Token model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7428 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/token.rb')
-rw-r--r-- | app/models/token.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/token.rb b/app/models/token.rb index c6d6f3b90..89d1352ee 100644 --- a/app/models/token.rb +++ b/app/models/token.rb @@ -19,11 +19,11 @@ class Token < ActiveRecord::Base belongs_to :user validates_uniqueness_of :value - before_create :delete_previous_tokens + before_create :delete_previous_tokens, :generate_new_token @@validity_time = 1.day - def before_create + def generate_new_token self.value = Token.generate_token_value end |