aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/paths.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-02-07 11:37:02 -0600
committerJoshua Peek <josh@joshpeek.com>2009-02-07 11:37:02 -0600
commit50f51ff95047858fa6dd889ade3027b7254c6dc0 (patch)
tree9a1c5e4d174ce5180eff33dcaaca14891833d525 /actionpack/lib/action_view/paths.rb
parentf98d8ee72b2fd92bf0e09f3cade60add9efd3a15 (diff)
downloadrails-50f51ff95047858fa6dd889ade3027b7254c6dc0.tar.gz
rails-50f51ff95047858fa6dd889ade3027b7254c6dc0.tar.bz2
rails-50f51ff95047858fa6dd889ade3027b7254c6dc0.zip
Render implicit html template when xhr request now supports localization [#1886 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/paths.rb')
-rw-r--r--actionpack/lib/action_view/paths.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb
index c7d6fd696a..b487bd1aa7 100644
--- a/actionpack/lib/action_view/paths.rb
+++ b/actionpack/lib/action_view/paths.rb
@@ -50,6 +50,8 @@ module ActionView #:nodoc:
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}.#{I18n.locale}.html"]
+ return template
elsif format == :js && template = load_path["#{template_path}.html"]
return template
end