Rails 3 and Devise: Redirecting to page following signup (confirmable)

后端 未结 3 944
死守一世寂寞
死守一世寂寞 2021-01-01 19:16

I have a Rails 3 project with Devise, confirmable enabled so the user has to confirm their account through email after registration. Currently the project returns the user t

3条回答
  •  感动是毒
    2021-01-01 19:50

    I'm just putting @Shannon's comment into an answer to make it easier to find.

    If you are requiring email confirmation after sign-up, your user will be left in an in-between state where they have signed up but not clicked the link emailed to them to confirm their account. This is an inactive sign up. To redirect in this situation you need to specify:

    def after_inactive_sign_up_path_for(resource)
      "http://example.com"
    end
    

提交回复
热议问题