This is driving me crazy. How do I force Content-Type to "text/xml"? It doesn''t matter what I''ve tried, I still get "application/xml". I''ve tried: headers["Content-Type"] = "text/xml" response.headers["Content-Type"] = "text/xml" I''m rendering a builder file through: render :template => "controller/file" # file is of course file.builder I''ve even jumped down into Rails and gotten rid of every instance of "application/xml" I could find (incidentally, only in mime_types.rb), and it STILL gives me that type. What am I missing? Jason --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
raskchanky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-25 22:04 UTC
Re: Force Content-Type ''text/xml''
I''ve had luck with the following: render :text => xml_variable_here, :content_type => "text/xml" I''ve never tried it with render :template though. HTH - josh On Jun 20, 7:38 am, "Jason Roelofs" <jameskil...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is driving me crazy. How do I force Content-Type to "text/xml"? It > doesn''t matter what I''ve tried, I still get "application/xml". > > I''ve tried: > > headers["Content-Type"] = "text/xml" > response.headers["Content-Type"] = "text/xml" > > I''m rendering a builder file through: > > render :template => "controller/file" # file is of course file.builder > > I''ve even jumped down into Rails and gotten rid of every instance of > "application/xml" I could find (incidentally, only in mime_types.rb), and it > STILL gives me that type. > > What am I missing? > > Jason--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---