mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Add validation for uid uniqness [GIOT-29]
This commit is contained in:
parent
91233a97c4
commit
fc0e2d2172
1 changed files with 1 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
class UserIdentity < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
validates :provider, uniqueness: { scope: :user_id }
|
||||
validates :uid, uniqueness: { scope: :provider }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue