Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3397

Show
Ignore:
Timestamp:
01/12/06 07:16:23 (3 years ago)
Author:
marcel
Message:

Allow auto-discovery of third party template library layouts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r3383 r3397  
    11*SVN* 
     2 
     3*  Allow auto-discovery of third party template library layouts. [Marcel Molina Jr.] 
    24 
    35* 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  
    175175        def inherited(child) 
    176176          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? 
    178178        end 
    179179 
    180180        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) } 
    182182        end 
    183183