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

Avoid sending confirmation email #422

Closed
jetsekoopmans opened this issue Jan 20, 2014 · 5 comments
Closed

Avoid sending confirmation email #422

jetsekoopmans opened this issue Jan 20, 2014 · 5 comments

Comments

@jetsekoopmans
Copy link

I have installed devise_invitable. When someone is invited, two email are sent. One confirmation and one invitation. I want to skip the confirmation email. Can anyone help me?

I have version 1.3.2 of devise_invitable and 3.2.2 of devise

@scambra
Copy link
Owner

scambra commented Jan 21, 2014

confirmation shouldn't be sent, did you changed anything in your model?

@jetsekoopmans
Copy link
Author

I didn't...
Fixed it already by adding

def invite!
self.skip_confirmation!
super
end

to user.rb

@scambra
Copy link
Owner

scambra commented Jan 22, 2014

https://github.com/scambra/devise_invitable/blob/master/lib/devise_invitable/model.rb#L111

It should be skipped without custom code. Is it a persisted record? resending invitation?

skip_confirmation is not used in invitable since 38e5881 but maybe new_record? shouldn't be checked

@scambra
Copy link
Owner

scambra commented Jan 30, 2014

What ruby version?

@twe4ked
Copy link

twe4ked commented Mar 24, 2015

I had a similar problem, I was calling save on the user inside the invite! block. Fixed by rearranging some code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants