Changeset 3397
- Timestamp:
- 01/12/06 07:16:23 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (1 diff)
- trunk/actionpack/test/controller/layout_test.rb (added)
- trunk/actionpack/test/fixtures/layout_tests (added)
- trunk/actionpack/test/fixtures/layout_tests/layouts (added)
- trunk/actionpack/test/fixtures/layout_tests/layouts/item.rhtml (added)
- trunk/actionpack/test/fixtures/layout_tests/layouts/layout_test.rhtml (added)
- trunk/actionpack/test/fixtures/layout_tests/layouts/third_party_template_library.mab (added)
- trunk/actionpack/test/fixtures/layout_tests/views (added)
- trunk/actionpack/test/fixtures/layout_tests/views/hello.rhtml (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r3383 r3397 1 1 *SVN* 2 3 * Allow auto-discovery of third party template library layouts. [Marcel Molina Jr.] 2 4 3 5 * Have the form builder output radio button, not check box, when calling the radio button helper. #3331 [LouisStAmour@gmail.com] trunk/actionpack/lib/action_controller/layout.rb
r3316 r3397 175 175 def inherited(child) 176 176 inherited_without_layout(child) 177 child.layout(child.controller_name) unless layout_list.grep(/^#{child.controller_name}\. r(?:x|ht)ml$/).empty?177 child.layout(child.controller_name) unless layout_list.grep(/^#{child.controller_name}\.[a-z][0-9a-z]*$/).empty? 178 178 end 179 179 180 180 def layout_list 181 Dir.glob("#{template_root}/layouts/*. r{x,ht}ml").map { |layout| File.basename(layout) }181 Dir.glob("#{template_root}/layouts/*.*").map { |layout| File.basename(layout) } 182 182 end 183 183