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


I have a railway 3 project division, the confirmation is enabled so that the user can confirm his account via email after registration. Have to do Currently this project gives the user a login page and "you have successfully signed up ..." Notice what I want to do instead, is redirected to the "Thank you" page and with instructions (your email, Spam folder, blah blah).

My first stop was Vikas Wiki, where I am feeling easy enough, I made the following changes and followed the instructions ...

/ app / controllers / registrations_controller .rb

  Class Registration Controller & lt; Devise :: RegistrationsController protected def after_sign_up_path_for (resource) "http://google.com" and end   

/config/routes.rb < Ex> devise_for: user,: controllers = & gt; {: Registration = & gt; "Registration"}

I had to make a change in that direction to see the "Registration" folder / app / view / folder and above / app / views folder, the form of an error The ideas that are back in now are disappearing. Even so, despite the override when the controller is seen to work (I do not think that the idea would have originally broken otherwise), these guidelines do not work ... after page ignores_in_ign_up and after signing up Returns to the login page.

Hunting went on the internet including other stack overflow threads, but I did not find anything, worked for me ... either the answer confuses the redirect sign up sign, or Those who are actually redirecting the redirects when they are signed (as usual, usually indicate authenticity after registration without confirmation).

Other things that I've tried ...

  1. In the after_sign_up_path_for (resource) application controller does not work oddly, do the same with After- Resource (processing) and signing in as a user redirects.

  2. Transfer / app / controllers / in / app / controllers from registration_ controller.rb / updating user folders and all routes / references / etc. Will not go.

  3. Registration of your own registration_controller.rb.register_controller Copy rb. Did not work, just threw an error and I rolled it all back.

  4. I tried try_inactive_sign_up_path_ (resource) after def, as I thought the fact that the account was not yet active was criminal.

  5. Is there any success in dragging someone with this confirmable ability?

    Which version of the plan are you using? I'm pretty sure that you probably need the latest version from the repo, which is still a release candidate (although it should be out shortly because they were waiting for 0.2 to exit Beta, which recently happened).

    I am using the Device 1.2RC2 with the Zithub repo with Rail Rail 3.02.5. I added the code that you told my custom registration controller and after creating a new account it was sent to Google as expected.

    In a cutdown version (App / Controller / User) of my registration controller

      Class User: Registration Controller & lt; Devise :: registrationsController protected def after_sign_up_path_for (resource) "http://google.com" and end   

    My routes. RB entry

      devise_for: users,: admin = & gt; {: Registration = & gt; "User / registration"}   

    from my jemphile

      gem 'devise' ,: git = & gt; "Git: //github.com/plataformatec/devise.git"   

    Let me know if you have a problem with the latest version of the plan.

Comments