Use `has_token` in your model to automatically generate a unique token on before_create. (Model needs to have a `token` field with type string.)
Stefan Daschek, Moritz Kobrna
gem "da-has_token", "~> 1.0.1"