From 093f758bd05d5b6144fd06aa0606c2f987c4ee09 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 27 Jan 2009 14:09:11 -0600 Subject: Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved] --- actionpack/lib/action_view/paths.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index cb351620d2..ee26542a07 100644 --- a/actionpack/lib/action_view/paths.rb +++ b/actionpack/lib/action_view/paths.rb @@ -45,6 +45,9 @@ module ActionView #:nodoc: return template elsif template = load_path[template_path] return template + # Try to find html version if the format is javascript + elsif format == :js && template = load_path["#{template_path}.html"] + return template end end -- cgit v1.2.3