To add to Fred's note, you don't need to pass a controller class level
variable (@participant) as a local variable to a second partial in the
same request cycle as it is already visible.

On Sep 17, 2:35 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On Sep 17, 6:17 am, windtrack <windtr...@comcast.net> wrote:> I'm not able to 
> get past this...  Basically I'm displaying my
> > "Participant" and wish to display participant details which includes
> > several partials.  I've studied this over and over and I cannot fathom
> > how an infinite loop can come from showing an object and its sub-
> > objects.  Feel like I'm getting nuts here.   Are there other reasons
> > we can get this error "stack level too deep"?
>
> >  Showing participants/show.html.erb where line #63 raised:
>
> > stack level too deep
>
> > 63:     <%= render :partial=>'messages/list', :locals => { :pid =>
> > nil, :@messages => @participant.messages, @participant=> @participant }
> > %>
>
> This use of locals looks a bit weird, but i don't think it is the
> problem
>
>
>
> > Then I reboot webrick.  Then it works fine for one hit to 'http://
> > localhost:3001/participants/show", but not any subsequent
> > refreshes.     Perhaps its my IDE?   Radrails 1.2.7.024747
>
> Unlikely. Stuff that works for one request only usually indicates that
> the code that reloads your source in between requests has got
> confused.
> One way of doing this is using require to require classes from your
> app: either don't use require (let rails load things magically) or use
> require_dependency as that keeps rails in the loop about what you are
> doing
>
> 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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to