From dbf42e379becc5612a0efe3476a999a9d6d803f0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 6 Mar 2007 09:46:04 +0000 Subject: Prefer MIME constants to strings. Closes #7707. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/base.rb') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 1b3cf5d95e..d66b43cd68 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -470,11 +470,11 @@ module ActionView #:nodoc: if template_requires_setup?(extension) body = case extension.to_sym when :rxml, :builder - "controller.response.content_type ||= 'application/xml'\n" + + "controller.response.content_type ||= Mime::XML\n" + "xml = Builder::XmlMarkup.new(:indent => 2)\n" + template when :rjs - "controller.response.content_type ||= 'text/javascript'\n" + + "controller.response.content_type ||= Mime::JS\n" + "update_page do |page|\n#{template}\nend" end else -- cgit v1.2.3