def store_current_location
      return if (devise_controller? && params[:redirect_url].blank?) || !request.format.html?

      value = params[:redirect_url] || request.url
      store_location_for(:user, value)
    end
def store_current_location
      return if (devise_controller? && params[:redirect_url].blank?) || !request.format.html?

      value = params[:redirect_url] || request.url
      store_location_for(:user, value)
    end
Stores the url where the user will be redirected after login.

 Uses the `redirect_url` param or the current url if there's no param.
 In Devise controllers we only store the URL if it's from the params, we don't
 want to overwrite the stored URL for a Devise one.