Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module

This commit is contained in:
Yehuda Katz + Carl Lerche
2009-06-16 13:54:55 -07:00
parent dd58f4021d
commit 315147fcb5
2 changed files with 7 additions and 2 deletions

View File

@@ -140,8 +140,6 @@ module AbstractController
rescue NameError => e
raise NoMethodError,
"You specified #{@_layout.inspect} as the layout, but no such method was found"
rescue ActionView::MissingTemplate
_find_by_parts(_layout({}), {})
end
end

View File

@@ -118,6 +118,13 @@ module ActionController
details[:prefix] = nil if name =~ /\blayouts/
super
end
# Move this into a "don't run in production" module
def _default_layout(details, require_layout = false)
super
rescue ActionView::MissingTemplate
_find_by_parts(_layout({}), {})
end
def performed?
response_body