suweller / mongoid-autoinc

⬆ Auto incrementing fields for Mongoid documents
MIT License
62 stars 44 forks source link

Adds ability to seed incrementing number #8

Closed mgartner closed 11 years ago

mgartner commented 11 years ago

I've added the ability to start the incrementing number at a given value, in the case where someone may not want it to start at 0. Let me know what you think.

suweller commented 11 years ago

Thanks for the contribution!

I placed a comment, but I have the feeling I was too hasty about it. Will take my time to look it over later this week.

matsimitsu commented 11 years ago

Looks good! :+1:

matsimitsu commented 11 years ago

@suweller You can merge this if you want, or i'll merge it tomorrow :)

mgartner commented 11 years ago

I just fixed a typo in the README and simplified the line in Autoinc#increment! from seed = options[:seed] ? options[:seed] : nil to seed = options[:seed], as pointed out by @suweller. It was a silly artifact that I had forgotten to clean up. Let me know if there is anything else you'd like me to change.