Let's hit the ball, After working on a subscription platform for a while I realized new user's who wanted to pay for service's on the go have to sign up but after signup, Devise redirect the user to the root page, user's will have to look up what they wanted all over again.
devise allows us to override most of the implementation,
we can create a registration controller.
class Users::RegistrationsController < Devise::RegistrationsController
url = session[:fall_back_url]
session[:fall_back_url] = nil
if current_user && url
And inside controller methods we might what to save user's url, we'll save it an session
session[:fall_back_url] = request.url