-class OauthNonce < ActiveRecord::Base
- validates_presence_of :nonce, :timestamp
- validates_uniqueness_of :nonce, :scope => :timestamp
+class OauthNonce < ApplicationRecord
+ validates :timestamp, :presence => true
+ validates :nonce, :presence => true, :uniqueness => { :scope => :timestamp }