Permalink
Browse files

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

…or moving it into a "not-production" module
  • Loading branch information...
1 parent dd58f40 commit 315147fcb5be2a937dcceb785de04a97616c49d0 Yehuda Katz + Carl Lerche committed Jun 16, 2009
@@ -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

0 comments on commit 315147f

Please sign in to comment.