X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d227589a6336999c38bffc5e11655100b9a4630a..17f4e58e46b42e2b21704ff3293388ea9c11c77d:/app/models/oauth_token.rb diff --git a/app/models/oauth_token.rb b/app/models/oauth_token.rb index f64ec53db..c45a3d569 100644 --- a/app/models/oauth_token.rb +++ b/app/models/oauth_token.rb @@ -3,7 +3,7 @@ class OauthToken < ActiveRecord::Base belongs_to :user validates_uniqueness_of :token validates_presence_of :client_application, :token, :secret - before_validation_on_create :generate_keys + before_validation :generate_keys, :on => :create def self.find_token(token_key) token = OauthToken.find_by_token(token_key, :include => :client_application)