lib/saasable/mongoid/scoped_document.rb in saasable-4.0.1 vs lib/saasable/mongoid/scoped_document.rb in saasable-4.0.2

- old
+ new

@@ -39,10 +39,10 @@ validates_with(Mongoid::Validatable::UniquenessValidator, attributes) end def index_with_saasable(spec, options = nil) - index_without_saasable(spec, options.except(:unique)) # Never create this one with unique since it's only unique in the saas scope. + index_without_saasable(spec, options.merge({unique: false})) index_without_saasable({saas_id: 1}.merge(spec), options) unless spec.include?(:saas_id) end end end