REXML - XML query only returning one (last) result

I'm really new to Ruby on Rails, and I'm trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the

include REXML
require 'rexml/document'
require 'rexml/xpath'

class MakeFootprintController < ApplicationController
  def index
    file ="#{RAILS_ROOT}/xml/footprints.xml")
    doc =
    doc.each_element('//day') { |day|
      render_text day

Thanks for the help.

By default, render_text sets the response body (instead of appending to it), so all your calls to render_text are overwriting each other,
render_text takes extra parameters that allow you to override this
Calling render_text more than once isn't really right though. (You could use a partial or something).


Thanks Fred!