diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-22 14:14:41 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-12-02 08:35:34 +0100 |
commit | 543ccf740d57eb7e0b027b74bf2fa2538d39ed5a (patch) | |
tree | ccc5488026da1889c6816557c8a7e3f5c71cf615 /actionview/lib | |
parent | 2e296c8ee5ddcbd20d7cc80313553148092f77b2 (diff) | |
download | rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.tar.gz rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.tar.bz2 rails-543ccf740d57eb7e0b027b74bf2fa2538d39ed5a.zip |
`ActionView::MissingTemplate` for partials includes underscore.
Missing partial folder/_partial instead of folder/partial.
Closes #13002.
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/template/error.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb index 7b4b5e13e0..743ef6de0a 100644 --- a/actionview/lib/action_view/template/error.rb +++ b/actionview/lib/action_view/template/error.rb @@ -41,6 +41,9 @@ module ActionView 'template' end + if partial && path.present? + path = path.sub(%r{([^/]+)$}, "_\\1") + end searched_paths = prefixes.map { |prefix| [prefix, path].join("/") } out = "Missing #{template_type} #{searched_paths.join(", ")} with #{details.inspect}. Searched in:\n" |