class Shoulda::Matchers::ActiveModel::ValidateUniquenessOfMatcher
def set_scoped_attributes
def set_scoped_attributes if @options[:scopes].present? @options[:scopes].all? do |scope| setter = :"#{scope}=" if @subject.respond_to?(setter) @subject.send(setter, existing.send(scope)) true else @failure_message = "#{class_name} doesn't seem to have a #{scope} attribute." false end end else true end end