]> git.openstreetmap.org Git - rails.git/blob - app/models/user_token.rb
Remove the noname layer and add the transport and MapQuest layers
[rails.git] / app / models / user_token.rb
1 class UserToken < ActiveRecord::Base
2   belongs_to :user
3
4   after_initialize :set_defaults
5
6 private
7
8   def set_defaults
9     self.token = OSM::make_token() if self.token.blank?
10     self.expiry = 1.week.from_now if self.expiry.blank?
11   end
12 end