[Rails] redirect_to doesn't create history
I have a wizard type flow where on each screen clicking the "continue"
button posts data to the server, then I use redirect_to to show the
main wizard page (which dynamically shows partials based on the
current state). The oddity I'm seeing - and maybe it's just an HTTP
thing - is that when these redirects happen, there is NO entry in the
browser history - not even for the page that was redirected to. So,
if this happens:
GET /wizard (on "page 1" here)
POST /wizard (form filled in on "page 1" is processed here,
model's page parameter changed to "2", then I do a redirect_to
wizard_url)
GET /wizard (on "page 2" here because the model had it's page
number changed)
What I see in history is the initial entry for wizard and that's it.
So if a user is on page 2 (or 3 or 4 or whatever) and hits their back
button, they go back to whatever page was displayed before they first
started the wizard.
Is there a special HTTP code I can set using the :status parameter to
force it to put ALL of the GET requests in the history (even the ones
initiated by redirect)?
Thanks for any help.
jc
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home