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

Sequenced fields for sub-classed Mongoid Documents. #2

Open gt-sdi opened 12 years ago

gt-sdi commented 12 years ago

First ... thank you for your super useful Gem. I've extended it for sub-classed documents.

Adds use_superclass_sequence so that subclassed documents increment the superclass sequence(s). Subclasses can also declare their own sequenced fields.

gt-sdi commented 12 years ago

Realized that sequence wasn't working on embedded documents .... so added that too.