]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/oauth_token.rb
Use before_validation with :on rather than before_validation_on_xxx
[rails.git] / app / models / oauth_token.rb
index f64ec53dbaf4869712d0b2bd1abc1f19a1dd1870..c45a3d569e0bdc8f7f2af78c9c7cef5dd0a3c160 100644 (file)
@@ -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)