Move the exceptions for missing template into Compatibility in prep for moving...

Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module
上级 dd58f402
......@@ -140,8 +140,6 @@ def _default_layout(details, require_layout = false)
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 @@ def _find_by_parts(name, details)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册