I have a ruby on rails app that has a signup page. Different pages redirect to the signup page and need to set another page to redirect to after the sign up is complete. What is the best way to do this? I’m currently doing this:
link_to ‘/signup?redirect=/blah/page6
…and getting the redirect variable in the signup controller and using that to set the after signup page. I’m worried that this may cause some security issues, but I’m not really sure.
Is this acceptable or is there a better way?
I use these 2 methods to help with this in my
application_controller.rb:When they reach the signup page, just run
store_location, and when it’s finished and complete, use theredirect_back_or_defaultmethod.(Of course modify this to your liking)