From d209aea7d88849b7c7a080d729045ce7c051ef1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 29 Jul 2009 19:31:03 +0200 Subject: Remove last TODO. Signed-off-by: Yehuda Katz --- actionpack/lib/action_controller/base/mime_responds.rb | 4 ---- actionpack/lib/action_controller/base/renderer.rb | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'actionpack/lib/action_controller/base') diff --git a/actionpack/lib/action_controller/base/mime_responds.rb b/actionpack/lib/action_controller/base/mime_responds.rb index 5a70931941..f4a4007a43 100644 --- a/actionpack/lib/action_controller/base/mime_responds.rb +++ b/actionpack/lib/action_controller/base/mime_responds.rb @@ -263,11 +263,7 @@ module ActionController #:nodoc: protected def respond_to_block_or_template_or_resource(format, resource, options) - # TODO It should be just: self.formats = [ :foo ] self.formats = [format.to_sym] - self.content_type = format - self.template.formats = [format.to_sym] - return yield if block_given? begin diff --git a/actionpack/lib/action_controller/base/renderer.rb b/actionpack/lib/action_controller/base/renderer.rb index 2fab501302..572da451ff 100644 --- a/actionpack/lib/action_controller/base/renderer.rb +++ b/actionpack/lib/action_controller/base/renderer.rb @@ -11,11 +11,10 @@ module ActionController def render(options) super - options[:_template] ||= _action_view._partial self.content_type ||= begin mime = options[:_template].mime_type formats.include?(mime && mime.to_sym) || formats.include?(:all) ? mime : Mime::Type.lookup_by_extension(formats.first) - end + end.to_s response_body end -- cgit v1.2.3