From e693f45e155a81b6c337b8766870b56716a05105 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Thu, 21 May 2009 14:22:07 -0700 Subject: Remove some response content type concepts from ActionView --- actionpack/lib/action_controller/base/mime_responds.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 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 e560376e0d..3c17dda1a1 100644 --- a/actionpack/lib/action_controller/base/mime_responds.rb +++ b/actionpack/lib/action_controller/base/mime_responds.rb @@ -122,12 +122,11 @@ module ActionController #:nodoc: # TODO: Remove this when new base is merged in if defined?(Http) @controller.formats = [mime_type.to_sym] - @controller.template.formats = [mime_type.to_sym] - else - @controller.template.formats = [mime_type.to_sym] - @response.content_type = mime_type.to_s end + @controller.template.formats = [mime_type.to_sym] + @response.content_type = mime_type.to_s + block_given? ? block.call : @controller.send(:render, :action => @controller.action_name) end end -- cgit v1.2.3