Re: [Rails] 'redirect_to' taking infinite loop.
On 1 August 2012 12:57, Ajit Teli <lists@ruby-forum.com> wrote:
> Hi,
>
> The following controller method taking me into infinite loop. Once the
> update action completes I want to reload the 'index' page. May I know
> why it is going into infinite loop?
>
> def update
> Device.find_by_id( params[:device_id] ).driver = (
> params[:driver_id] == 0 ) ? nil : Driver.find_by_id( params[:driver_id]
> )
>
> redirect_to :action => :index, :tab => 'limo'
> end
Not an answer to the problem but you do not seem to be saving anything
in the update action, which is a bit unusual.
Colin
>
>
> Thanks,
> Ajit
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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 https://groups.google.com/groups/opt_out.
>
>
--
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 https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home