gitlab-org--gitlab-foss/app/models/identity/uniqueness_scopes.rb
Yorick Peterse 9d5f921ab0
Move Identity.uniqueness_scope to a module
Moving this method to a separate module looks a bit odd, but it allows
for EE to extend the method without also having to redefine a variety of
validation rules.
2018-11-12 14:14:13 +01:00

11 lines
298 B
Ruby

# frozen_string_literal: true
class Identity < ActiveRecord::Base
# This module and method are defined in a separate file to allow EE to
# redefine the `scopes` method before it is used in the `Identity` model.
module UniquenessScopes
def self.scopes
[:provider]
end
end
end