Dave Naffis
2006-Aug-22 16:42 UTC
[Rails] Re: How to create a dynamic html table for resultset iterati
So you want to print out the appropriate td and tr tags right? And you''re using partials? There are a few ways to do this. If you''re doing something like <%= render :partial => "photo", :collection => @photos %> you can use photo_counter in your _photo.rhtml to determine when to print out the appropriate tr and td tags. You could also render a partial and pass it an :object. <%= render :partial => "photo", :object => @photos %> Then in your _photo.rhtml you can iterate over @photos any way you like. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---