aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-07-11 23:32:02 +0000
committerMichael Koziarski <michael@koziarski.com>2007-07-11 23:32:02 +0000
commitd4d4a08f6b064e47145b1abaca803654957f7a03 (patch)
tree1f732e6b61c18f220c651f8422059c59d64deffe /actionpack/lib/action_controller/base.rb
parente80fabbbf46cadb69c30e6125ef0422f96ca8b6b (diff)
downloadrails-d4d4a08f6b064e47145b1abaca803654957f7a03.tar.gz
rails-d4d4a08f6b064e47145b1abaca803654957f7a03.tar.bz2
rails-d4d4a08f6b064e47145b1abaca803654957f7a03.zip
Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-xactionpack/lib/action_controller/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index d3aff6a2c2..da948940af 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -1241,9 +1241,10 @@ module ActionController #:nodoc:
def assert_existence_of_template_file(template_name)
unless template_exists?(template_name) || ignore_missing_templates
- full_template_path = template_name.include?('.') ? template_name : @template.full_template_path(template_name, "#{@template.template_format}.erb")
+ full_template_path = template_name.include?('.') ? template_name : "#{template_name}.#{@template.template_format}.erb"
+ display_paths = view_paths.join(':')
template_type = (template_name =~ /layouts/i) ? 'layout' : 'template'
- raise(MissingTemplate, "Missing #{template_type} #{full_template_path}")
+ raise(MissingTemplate, "Missing #{template_type} #{full_template_path} in view path #{display_paths}")
end
end