Unverified Commit 21e227d8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Validate presence of provider field in Identity

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 615257b9
......@@ -14,6 +14,7 @@ class Identity < ActiveRecord::Base
include Sortable
belongs_to :user
validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: :provider }
validates :user_id, uniqueness: { scope: :provider }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment