From 751b6be46481d7f149c909e63096b96c37b3d68f Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Thu, 12 Jan 2006 07:16:23 +0000 Subject: Allow auto-discovery of third party template library layouts. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/layout.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index 3ec125f088..4b396bb0d4 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -174,11 +174,11 @@ module ActionController #:nodoc: private def inherited(child) inherited_without_layout(child) - child.layout(child.controller_name) unless layout_list.grep(/^#{child.controller_name}\.r(?:x|ht)ml$/).empty? + child.layout(child.controller_name) unless layout_list.grep(/^#{child.controller_name}\.[a-z][0-9a-z]*$/).empty? end def layout_list - Dir.glob("#{template_root}/layouts/*.r{x,ht}ml").map { |layout| File.basename(layout) } + Dir.glob("#{template_root}/layouts/*.*").map { |layout| File.basename(layout) } end def add_layout_conditions(conditions) -- cgit v1.2.3