goncalossilva / mongoid-sequence

Specify fields to behave like a sequence number (exactly like the "id" column in conventional SQL flavors) while using Mongoid.
MIT License
18 stars 36 forks source link

Add multi-tenant capability #1

Open cblock opened 12 years ago

cblock commented 12 years ago

Hi!

Thanks for this nice gem. I just added a small feature that allows one to specify another model field as additional discriminator for the sequence. The value of the specified field is added to the sequence name.

I need this feature to generate different sequences for different tenants.

Maybe others might find this useful too.

Thanks for considering this addition, Carsten

luizkowalski commented 12 years ago

any chances to accept this pull request?

jnwelzel commented 12 years ago

That would be nice!