Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:32:29+00:00 2026-06-13T23:32:29+00:00

I was having problems redirecting to the last visited page when that page required

  • 0

I was having problems redirecting to the last visited page when that page required a sign in Devise Resetting Session On Login and somebody pointed out that you could follow the code example here: https://github.com/plataformatec/devise/wiki/How-To%3A-redirect-to-a-specific-page-on-successful-sign-in

That example calls stored_location_for(resource)…where is that set?

That example works perfectly when used in conjunction with a before_filter :authenticate_user! in my appropriate controllers. Looking at the source code for authenticate_#{resource}!, https://github.com/plataformatec/devise/blob/master/lib/devise/controllers/helpers.rb it doesn’t seem to save the location.

Where in the world is the previous location stored?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:32:30+00:00Added an answer on June 13, 2026 at 11:32 pm

    The path is stored in session["user_return_to"] (assuming user is your model name).

    This appears to be set by store_location! in failure_app.rb

    Note that if you only have one devise model, the sign in redirect should work automatically, without you needing to override after_sign_in_path_for in your application_controller.rb.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problems in redirecting page with jquery. I have a variable url
Im having problems with displaying ONLY some elements ONLY on print page. For example
im having problems starting a codeigniter project, the problem is that when i do
I am having a problem with redirecting a page from example.com (to) www.example.com The
I'm having problems redirecting stdio of another program using subprocess module. Just reading from
Just having some problems redirecting urls. urls.py url(r'^index\.asp$', views.Redirect, name='redirect'), views.py pageID = {
Having problems with a small awk script, Im trying to choose the newest of
Having problems iterating. Problem has to do with const correctness, I think. I assume
Having problems with the combining of two statements in a controller. Both statements work
Im having problems with a method in a class file: public static function getPageLeft($pid)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.