Here is a high level overview of a solution.
On the user model you will need a boolean column with a default state of false. You will also need a string column to store token. A token would be a random string obtained by something like SecureRandom.urlsafe_base64
.
Then you should need a controller which will accept the token as a parameter and then find the user by its token and change the value of the aforementioned boolean field.
Next you would need a mailer that would send a email to the user with the url to active the account.
If you have any additional questions let me know.