scambra/devise_invitable — pull request #419 by zawaideh (2013-12-31 17:41:14+00:00)
Title: confirmation emails get sent inifinitely when an invited user signs up

the commit: https://github.com/scambra/devise_invitable/commit/51cd0485c6dec323e9456c6266f43e9c14a5d1e8#diff-c4d29d16cf6c6cb74d6523498cd0d88fR39

results in a confirmation email being sent with every update to the user model. Since generation a confirmation updates the user model, it ends up being sent in an infinite loop!

This pull request fixes the issue by checking if @confirmation_sent_at is present so that only one email gets sent.