From 8d4d88a4f01ed7b569b62489654f585434beea3a Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sun, 22 Jan 2006 07:41:27 +0000 Subject: Change layout discovery to take into account the change in semantics with File.join and nil arguments. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/layout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index 94fa4cc4ba..182a23a7d1 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -207,7 +207,7 @@ module ActionController #:nodoc: # Explicitly passed layout names with slashes are looked up relative to the template root, # but auto-discovered layouts derived from a nested controller will contain a slash, though be relative # to the 'layouts' directory so we have to check the file system to infer which case the layout name came from. - nested_controller = File.directory?(File.dirname(File.join(self.class.template_root, 'layouts', active_layout))) + nested_controller = File.directory?(File.dirname(File.join(self.class.template_root, 'layouts', active_layout))) if active_layout active_layout.include?('/') && !nested_controller ? active_layout : "layouts/#{active_layout}" if active_layout end -- cgit v1.2.3