Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

skip confirmation e-mail in development with devise

I am using devise and I want to be able to skip the confirmation e-mail while I am in development mode. Since my application can't send e-mail while running on my local machine, I will just get the alert message saying that you need to be confirmed before accessing the application.

like image 813
tomciopp Avatar asked Sep 19 '11 18:09

tomciopp


3 Answers

Devise has also a method skip_confirmation! that you can call on the model before saving it to avoid sending the mail. It simply sets the confirmed_at attribute which results in skipping the mail sending.

like image 57
Gnomet Avatar answered Nov 05 '22 15:11

Gnomet


try Letter Opener gem from Ryan Bates

https://github.com/ryanb/letter_opener

it will open the email in the browser without sending it. You don't want to be skipping stuff out if you're in development because stuff will get missed/forgotten about.

like image 42
John Beynon Avatar answered Nov 05 '22 14:11

John Beynon


As simple as that

user=User.new
user.email="[email protected]"
user.password="yourPassword"
user.skip_confirmation!
user.save
like image 13
Nishutosh Sharma Avatar answered Nov 05 '22 16:11

Nishutosh Sharma