aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-08 17:32:19 -0700
committerYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-08 17:33:41 -0700
commit1aadafda8dd28ec081da6827878003c478c77c76 (patch)
treead1566e99f5ffdcc8525f0a6754df47661d8ce50 /actionpack/lib/action_view
parent6c05b5e938ac48b69aec17c598fec447e38dde31 (diff)
downloadrails-1aadafda8dd28ec081da6827878003c478c77c76.tar.gz
rails-1aadafda8dd28ec081da6827878003c478c77c76.tar.bz2
rails-1aadafda8dd28ec081da6827878003c478c77c76.zip
Updated old AC::Base for small changes to AV
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/base.rb3
-rw-r--r--actionpack/lib/action_view/render/rendering.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 2f7cfeb88e..ada9052073 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -3,10 +3,11 @@ module ActionView #:nodoc:
end
class MissingTemplate < ActionViewError #:nodoc:
- attr_reader :path
+ attr_reader :path, :action_name
def initialize(paths, path, template_format = nil)
@path = path
+ @action_name = path.split("/").last.split(".")[0...-1].join(".")
full_template_path = path.include?('.') ? path : "#{path}.erb"
display_paths = paths.compact.join(":")
template_type = (path =~ /layouts/i) ? 'layout' : 'template'
diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb
index 68b343de77..2d8bdab100 100644
--- a/actionpack/lib/action_view/render/rendering.rb
+++ b/actionpack/lib/action_view/render/rendering.rb
@@ -79,7 +79,7 @@ module ActionView
@_render_stack.pop
result
rescue Exception => e
- raise e if !template.filename || template.is_a?(InlineTemplate)
+ raise e if template.is_a?(InlineTemplate) || !template.filename
if TemplateError === e
e.sub_template_of(template)
raise e