devise_invitable
devise_invitable copied to clipboard
`before_invitation_created` callback executed for `User.invite!`, but not for `@user.invite!`
See title.
I'd expect for this callback to be executed for both method calls, but clearly this isn't the case. Is this a bug or desired behavior? If it's expected behavior it might be worth specifying this quirk in the docs. Either way, happy to lend a hand with a PR.
I'm using devise_invitable
from master if that's useful information at all.
It isn't expected behaviour, indeed run_callbacks :invitation_created it's called inside @user.invite! method, I don't know why it wasn't called for you. What version are you using? I don't remember if previous versions was different, I only checked current code.