Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move the exceptions for missing template into Compatibility in prep f…

…or moving it into a "not-production" module
  • Loading branch information...
commit 315147fcb5be2a937dcceb785de04a97616c49d0 1 parent dd58f40
Yehuda Katz + Carl Lerche authored
View
2  actionpack/lib/action_controller/abstract/layouts.rb
@@ -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
View
7 actionpack/lib/action_controller/base/compatibility.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.