Re: Basic question about partials

Kent Sibilev
Sun, 11 Dec 2005 02:05:45 -0000

Yes. :P

Check out actionpack/lib/action_view/partials.rb and render_partial_collection
method.

Kent.

On Saturday 10 December 2005 20:48, richard downe wrote:
> I''m new to Rails and working through the Agile Web Dev w\Rails
book
> (which is great by the way).  My question is:  Do partials iterate by
> default?  For example,   in Chapter 10 of the before mentioned book, the
> author introduces partials and basically codes an HTML table row
> populated with ruby objects.  This code (partial) then goes into the
> HTML table but nowhere in the code (partial or view) do I see any
> iteration code.  Like I say, I''m new and I''m trying to
figure out how
> the ''magic'' happens.  How does rails take one HTML row
and repeat it
> throughout a table?  Does rails iterate through the
'':collection''
> repeating rows as long as there is data in the
'':collection''?
>
> Thanks for any help in advance!