scinote-web/app/models/user_identity.rb

8 lines
232 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-08-30 00:49:07 +08:00
class UserIdentity < ActiveRecord::Base
belongs_to :user
validates :provider, presence: true, uniqueness: { scope: :user_id }
validates :uid, presence: true, uniqueness: { scope: :provider }
2017-08-30 00:49:07 +08:00
end