scinote-web/app/models/user_identity.rb

5 lines
201 B
Ruby

class UserIdentity < ActiveRecord::Base
belongs_to :user
validates :provider, presence: true, uniqueness: { scope: :user_id }
validates :uid, presence: true, uniqueness: { scope: :provider }
end