i try to understand the rendering of partials as objects.
So, lets imagine i’ve got Threads with posts , and i will just render
the posts of one thread.
The code to render all posts will seems to be something like that:
<%= render :partial => @posts %>
But how can i just render the posts of one thread, so i will set a
parameter with the thread_id
or something like that. Can i do this with a ;local ? Where can i
acces the parameter i use to render partial objects?
So, i have to fill an collection of objects (posts) in the Controller
i can generate the partial output with the collection of objects.
Does there isn’t another way , where i don’t have to do that in the
e.g. to call the the resource from the template?