]> git.openstreetmap.org Git - rails.git/blob - app/models/user_token.rb
Update list of filtered methods in notes controller
[rails.git] / app / models / user_token.rb
1 class UserToken < ActiveRecord::Base
2   belongs_to :user
3
4   attr_accessible :referer
5
6   after_initialize :set_defaults
7
8 private
9
10   def set_defaults
11     self.token = OSM::make_token() if self.token.blank?
12     self.expiry = 1.week.from_now if self.expiry.blank?
13   end
14 end