tiagopog/smart_rspec

Add support to multiple scopes for uniqueness

tiagopog opened this issue · 0 comments

Currently it only supports to check a single scope for uniqueness:

fails_validation_of :username, uniqueness: { scope: :name, mock: other_user }

But it's important to be able to check uniqueness within multiple scopes:

fails_validation_of :username, uniqueness: { scope: %i(company_id name), mock: other_user }