class PeopleController < ApplicationController
def index @peope = People.find(:all)
respond_to do | request |
request.html { }
request.xml { render :xml => @people…to_xml(:except => [:id])
}
end
end
end
I tried with this and I always get execution timeout?
Are you doing this from the same rails app? in dev mode you typically
only have 1 mongrel, if 1 is busy executing the above code that leaves
no one to handle the request you;re making.
On top of that you need to tell it you want xml. You can either do
this by setting the Accept header or by saying you want people.xml
(assuming you’ve got the standard routes setup)
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.