X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3244635aa11878135a014cf2c9ec9177f8e9d0ba..56df4f3813a12a56d9352e5439423de78ed0c7b7:/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)