Hi there. If I understand well what you need I think you are trying to make things more complicated than they should be. Forget about your table rows for a moment and lets look at just text. Let's say that I have to output the following lines:
This is my line number 1 This is my line number 2 This is my line number 3 This is my line number 4 This is my line number 5 To make things easy I'll say that my program has the following code, with no loops: puts 'This is my line number 1' puts 'This is my line number 2' puts 'This is my line number 3' puts 'This is my line number 4' puts 'This is my line number 5' Now, if I say that what my program always have to output are lines 1 and 5 and whatever comes in the middle can vary I encapsulate the inner lines in a method call: puts 'This is my line number 1' print_rest_of_lines puts 'This is my line number 5' def print_rest_of_lines puts 'This is my line number 2' puts 'This is my line number 3' puts 'This is my line number 4' end The result is what I expect, the 5 lines printed in the sequence I wrote at the beginning. If you treat your partial the same way as you wold treat the method call you will produce the same effect. What I was trying to explain in the previous posting is not that you render 'your_C_and_D_partial from 'your_A_and_B_partial'. What I was trying to say is that you can just divide your table rows in as many (or as little) partials as you need. Just remember that a partial behaves the same as a method call and you'll understand what you'll get out of it. Pepe On Jan 4, 7:52 am, Zhao Yi <[email protected]> wrote: > pepe wrote: > > Another sample based on the original listed above. You cold leave in > > your page: > > <tr> > > <%= :render :partial => 'your_A_and_B_partial' %> > > </tr> > > <tr> > > <%= :render :partial => 'your_C_and_D_partial' %> > > </tr> > > > If 'your_A_and_B_partial' delivers: > > <td>Text A<td> > > <td>Text B<td> > > > And 'your_C_and_D_partial' delivers: > > <td>Text C<td> > > <td>Text D<td> > > > You would get the expected results. > > Pepe > > Let's take a look at your example above. How can I render both > 'your_A_and_B_partial' and 'your_C_and_D_partial'? As you said, I can > render 'your_C_and_D_partial' in the partial 'your_A_and_B_partial'. But > how can I do this? > > thanks. > -- > Posted viahttp://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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

