mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user