From 72a574b5073b1debd58c954b34c54d3bdee7749f Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Fri, 22 May 2009 15:16:28 -0700 Subject: Get controller/layout_test.rb running on new base except for ActionController::Base.exempt_from_layout which is going to be deprecated. --- actionpack/lib/action_controller/abstract/layouts.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/abstract') diff --git a/actionpack/lib/action_controller/abstract/layouts.rb b/actionpack/lib/action_controller/abstract/layouts.rb index dec394a021..b3b743d6e8 100644 --- a/actionpack/lib/action_controller/abstract/layouts.rb +++ b/actionpack/lib/action_controller/abstract/layouts.rb @@ -65,12 +65,12 @@ module AbstractController # :api: plugin # ==== # Override this to mutate the inbound layout name - def _layout_for_name(name) + def _layout_for_name(name, details = {:formats => formats}) unless [String, FalseClass, NilClass].include?(name.class) raise ArgumentError, "String, false, or nil expected; you passed #{name.inspect}" end - name && view_paths.find_by_parts(name, {:formats => formats}, _layout_prefix(name)) + name && view_paths.find_by_parts(name, details, _layout_prefix(name)) end # TODO: Decide if this is the best hook point for the feature @@ -78,7 +78,7 @@ module AbstractController "layouts" end - def _default_layout(require_layout = false) + def _default_layout(require_layout = false, details = {:formats => formats}) if require_layout && _action_has_layout? && !_layout raise ArgumentError, "There was no default layout for #{self.class} in #{view_paths.inspect}" -- cgit v1.2.3