aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-27 14:09:11 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-27 14:09:11 -0600
commit093f758bd05d5b6144fd06aa0606c2f987c4ee09 (patch)
treede5412e2a38f2529f42c091bceb6e43e5ef8a34b /actionpack/lib/action_view
parentf17c87665e36206bcae9c260cb25cd67bf9695e6 (diff)
downloadrails-093f758bd05d5b6144fd06aa0606c2f987c4ee09.tar.gz
rails-093f758bd05d5b6144fd06aa0606c2f987c4ee09.tar.bz2
rails-093f758bd05d5b6144fd06aa0606c2f987c4ee09.zip
Restore implicit rendering for XHR requests that want a HTML template [#1590 state:resolved]
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/paths.rb3
1 files changed, 3 insertions, 0 deletions
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