]> git.openstreetmap.org Git - rails.git/blob - app/models/access_token.rb
Show a message when no features are found
[rails.git] / app / models / access_token.rb
1 class AccessToken < OauthToken
2   belongs_to :user
3   belongs_to :client_application
4
5   scope :valid, -> { where(:invalidated_at => nil) }
6
7   validates_presence_of :user, :secret
8
9   before_create :set_authorized_at
10   
11 protected 
12   
13   def set_authorized_at
14     self.authorized_at = Time.now
15   end
16 end