1

Use case: User fills out a form to add a product and register at once. When the user has submitted the combined form, the app authenticates the user and is logged in (assume validations passed) without the need to confirm or login.

I've removed the confirmable feature out, but when the user fill out the form, it succeeds, but the user doesn't get logged in unless they go to a login form. This isn't such a great experience, so is there a way to Register a user and immediately log them in?

Jonathan Mui
  • 2,471
  • 3
  • 19
  • 27

2 Answers2

5

What I actually wanted was sign_in(@user) from my controller

Jonathan Mui
  • 2,471
  • 3
  • 19
  • 27
0

If you want to login without confirmation then Remove :confirmable option from devise options in User model.

  • That wouldn't help for this case. I had already removed confirmable, but it wouldn't keep them signed in after my custom registration. – Jonathan Mui Aug 16 '12 at 18:08