Infinit
2008-Jun-12 11:00 UTC
error message in flash can''t display when using redirect_to
Hi all, I encountered a issue when using redirect_to: in new.html.erb <%= error_messages_for :user %> in my controller, when I use render :action => ''new'', the error msg can display correctly. but when I change render :action => ''new'' to redirect_to signup_url the error msg can''t display. Appreciate for your help. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten Müller
2008-Jun-12 11:04 UTC
Re: error message in flash can''t display when using redirect_to
redirect_to tells your browser to request the page. So you get a totally new request and all your model object states are lost --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Infinit
2008-Jun-12 12:08 UTC
Re: error message in flash can''t display when using redirect_to
Is there any way that I can keep the object states when using redirect_to ? Thanks. On 6月12日, 上午4时04分, Thorsten Müller <thors...@80beans.com> wrote:> redirect_to tells your browser to request the page. > So you get a totally new request and all your model object states are > lost--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---