I haven't actually used XML with Rails, but by my understanding,
calling:
/people.xml?title=CEO
is technically no different than calling:
/people?title=CEO
It just gives you the option to handle it via XML because of the
respond_to. You still have to process the parameters, i.e. in the
PeoplesController class for the "index" action, you might simply have:
def index
@people = Person.find_all_by_title(params[:title])
respond_to do |format|
format.html
format.xml { render :xml => @people }
end
end
You could probably get fancy with some metaprogramming but that might
be more than necessary.