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.

redirect_to tells your browser to request the page. So you get a totally new request and all your model object states are lost

Is there any way that I can keep the object states when using redirect_to ?

Thanks.