I dug into the code, and I noticed that you are only using devise_invitable to create the invite when someone accepts the invite created by this gem. This effectively causes the callbacks (such as before_invitation_created, after_invitation_created) provided devise_invitable to create side effects. For example, when a user accepts the invitation created by this gem then it would call hooks in before_invitation_created from devise_invitable which is unexpected.
I dug into the code, and I noticed that you are only using
devise_invitableto create the invite when someone accepts the invite created by this gem. This effectively causes the callbacks (such asbefore_invitation_created,after_invitation_created) provided devise_invitable to create side effects. For example, when a user accepts the invitation created by this gem then it would call hooks inbefore_invitation_createdfromdevise_invitablewhich is unexpected.