loops in a helper

def check_collection(collection,partial_array,msg)
  if collection.empty?
  msg
  else
  partial_array.each do |partial|
  render :partial => partial
  end
end

you can create a string (str_output for example) and then do something like
    str_output+= render_to_string (:partial=>partial)

finally put at the end of the helper "str_output", so that will be your return value.

regards,

javier ramirez