Add uniqueness validation for `SingleSignOnRecord#external_id`.

This commit is contained in:
Guo Xiang Tan 2017-11-30 15:15:52 +08:00
parent f7f743970b
commit 853b51b519
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,7 @@
class SingleSignOnRecord < ActiveRecord::Base
belongs_to :user
validates :external_id, uniqueness: true
end
# == Schema Information