I am trying to create an API and i need to return xml irrespective of the request format. now i have the following in my controller def index @posts = Post.all respond_to do |format| format.xml end end i have a index.xml.builder ''/posts.xml'' works for me but not ''/posts'' i tried request.format = :xml which gave me a SystemStackError (stack level too deep):. why is it happening. How can i force the controller to render xml for all types of request ? so that i dont need to specify the format in the url which looks clean and tidy -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.