openstreetmap-website/app/models/user_token.rb
Tom Hughes 0a8c26e596 Various updates to the user management, including the creation of a
preferences table and moving tokens into a tokens table so that a user
can have more than one.
2007-08-14 23:07:38 +00:00

8 lines
202 B
Ruby

class UserToken < ActiveRecord::Base
belongs_to :user
def after_initialize
self.token = OSM::make_token() if self.token.blank?
self.expiry = 1.week.from_now if self.expiry.blank?
end
end