Rich Collins successfully answered Don Miguel de los Platanos's question:

Whats the proper way to render partials, with :collection or :locals?

 

 

People succeed in answering Don Miguel de los Platanos's questions 42% of the time (8 successes in 19 attempts).

Answers by: Rich Collins

Rich Collins's Answer:

Reply by Rich Collins 739 days ago

It really depends on the situation.  If you have a collection that you want to iterate over and render a partial for each item in the collection, :collection is nice as you save the hassle of having to write the each code:

render :partial => 'foo', :collection => @foos

instead of

@foos.each do |foo|
  render :partial =>  'foo', :locals => {:foo => foo}
end

Reply by Don Miguel de los Platanos 739 days ago

thank you :D