mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 13:15:17 +01:00
Minor refactoring to User#generate_token
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@570 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
64321f5c46
commit
89055145dd
1 changed files with 1 additions and 2 deletions
|
|
@ -152,8 +152,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def generate_token
|
||||
new_token = Digest::SHA1.hexdigest "#{Time.now.to_i}#{rand}"
|
||||
write_attribute("token", new_token)
|
||||
self.token = Digest::SHA1.hexdigest "#{Time.now.to_i}#{rand}"
|
||||
end
|
||||
|
||||
def remember_token?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue