aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/layout.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-01-12 07:16:23 +0000
committerMarcel Molina <marcel@vernix.org>2006-01-12 07:16:23 +0000
commit751b6be46481d7f149c909e63096b96c37b3d68f (patch)
tree6c924e5741aa34995e2ae7101584f77925e833fd /actionpack/lib/action_controller/layout.rb
parent7ff73dfe73eedf1119f493fc7ad620861c434d46 (diff)
downloadrails-751b6be46481d7f149c909e63096b96c37b3d68f.tar.gz
rails-751b6be46481d7f149c909e63096b96c37b3d68f.tar.bz2
rails-751b6be46481d7f149c909e63096b96c37b3d68f.zip
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
Diffstat (limited to 'actionpack/lib/action_controller/layout.rb')
-rw-r--r--actionpack/lib/action_controller/layout.rb4
1 files changed, 2 insertions, 2 deletions
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)