diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/mime_responds.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/mime_responds.rb b/actionpack/lib/action_controller/mime_responds.rb index 80464ffdcd..ff07c3c12e 100644 --- a/actionpack/lib/action_controller/mime_responds.rb +++ b/actionpack/lib/action_controller/mime_responds.rb @@ -108,8 +108,9 @@ module ActionController #:nodoc: class Responder #:nodoc: DEFAULT_BLOCKS = [:html, :js, :xml].inject({}) do |blocks, ext| - blocks.update ext => %(Proc.new { render :action => "\#{action_name}.r#{ext}", :content_type => Mime::#{ext.to_s.upcase} }) - end + template_extension = (ext == :html ? '' : ".r#{ext}") + blocks.update ext => %(Proc.new { render :action => "\#{action_name}#{template_extension}", :content_type => Mime::#{ext.to_s.upcase} }) + end def initialize(block_binding) @block_binding = block_binding |