thetron/mongoid_token — pull request #21 by WrErase (2013-02-22 21:30:03+00:00)
Title: Added static string prefix option for token

My project has the requirement that mongoid_tokens be generated for several different mongo collections. So, we need a way to differentiate between them (both in the system and for users). I've added support for a static prefix string option that is prepended to the token after generation. It is stored with the token, but not considered for the length option.

`token :contains => :numeric, :length => 4, :prefix => 'TST-' `
`"TST-0123"`

Additional specs were added to cover the new option.