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 code:
include REXML require 'rexml/document' require 'rexml/xpath'
class MakeFootprintController < ApplicationController def index file = File.new("#{RAILS_ROOT}/xml/footprints.xml") doc = Document.new(file) doc.each_element('//day') { |day| render_text day } end end
Thanks for the help.