Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not invoke after_confirmation callback #711

Closed
mingca opened this issue May 8, 2017 · 2 comments
Closed

does not invoke after_confirmation callback #711

mingca opened this issue May 8, 2017 · 2 comments

Comments

@mingca
Copy link

mingca commented May 8, 2017

i found that this module does not invoke after_confirmation when user accept invitation. This is related to this code part.
https://github.com/scambra/devise_invitable/blob/master/lib/devise_invitable/model.rb#L97

i think it makes more sense to call self.confirm instead of self.confirmed_at = self.invitation_accepted_at if self.respond_to?(:confirmed_at) when devise confirmable module is enabled.

@mingca
Copy link
Author

mingca commented Mar 16, 2018

@scambra I can make a PR if you like.

@scambra
Copy link
Owner

scambra commented Mar 16, 2018

Not sure if good idea, confirm may fail if confirmation is expired or record is already confirmed.

It probably never happens, because devise invitable skips setting confirmation_sent_at and record shouldn't be confirmed when accepting invtation. But if someone change how it works it could make accepting invitation fail, maybe calling after_confirmation in accept_invitation! would be better.

@mingca mingca closed this as completed Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants