aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-16 13:54:55 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-16 13:54:55 -0700
commit315147fcb5be2a937dcceb785de04a97616c49d0 (patch)
tree4502e8242122230848717c2b4cd11b0773425613 /actionpack
parentdd58f4021da30af7f40ee139e7487b887cac44e9 (diff)
downloadrails-315147fcb5be2a937dcceb785de04a97616c49d0.tar.gz
rails-315147fcb5be2a937dcceb785de04a97616c49d0.tar.bz2
rails-315147fcb5be2a937dcceb785de04a97616c49d0.zip
Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/abstract/layouts.rb2
-rw-r--r--actionpack/lib/action_controller/base/compatibility.rb7
2 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/abstract/layouts.rb b/actionpack/lib/action_controller/abstract/layouts.rb
index 6aa196e807..2ac4e6068a 100644
--- a/actionpack/lib/action_controller/abstract/layouts.rb
+++ b/actionpack/lib/action_controller/abstract/layouts.rb
@@ -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
diff --git a/actionpack/lib/action_controller/base/compatibility.rb b/actionpack/lib/action_controller/base/compatibility.rb
index 29ba43a879..085db284e4 100644
--- a/actionpack/lib/action_controller/base/compatibility.rb
+++ b/actionpack/lib/action_controller/base/compatibility.rb
@@ -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