rubyonrailsin

A Ruby and Rails talk

Sunday, March 21, 2010


[Rails] Re: Error in the code Doube Render (colins')

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

On Mar 21, 7:00 pm, Tiger Big one <li...@ruby-forum.com> wrote:
> Hi everyone, i followed colins example and it worked perfectly but now i
> get this error
>
>  ActionController::DoubleRenderError in UserController#login
>
> Render and/or redirect were called multiple times in this action. Please
> note that you may only call render OR redirect, and at most once per
> action. Also note that neither redirect nor render terminate execution
> of the action, so if you want to exit an action after redirecting, you
> need to do something like "redirect_to(...) and return".
>

In the case where the request is a post request and if the user is
logged in successfully you are calling redirect_to :action => 'index'
twice

Fred

--
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.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive