rails contoller defaults to respond with application/xml in production
- by Dave Paroulek
I have a standard contacts_controller.rb with index action that responds as follows:
respond_to do |format|
format.html
format.xml { render :xml => @contacts }
end
In development, it works as intended: when I browse to http://localhost:3000/contacts, I get an html response.
But, when I start the app using capistrano on a remote ubuntu server and browse to the same url, I get a xml response?
If I go to http://remote_host:8000/contacts.html, then I see the html response. If I comment out the format.xml { render :xml => @contacts }, then I see the desired html response.
Pretty sure I'm missing something subtle about difference between rails development and production modes? Any ideas about what I'm overlooking?
Thanks,
- Dave