public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Merb::BootLoader::Templates now uses _template_roots not just 
_template_root
fabien (author)
Sat May 10 14:49:56 -0700 2008
commit  270967daa5e46466a9493558af54f29d27a082d6
tree    6f74920f14f7a0c0bae1de63ae85676fe84bbf33
parent  ca96f04c63dbe8152eef84e72ab9c266ab252861
...
433
434
435
436
437
438
 
 
 
 
 
 
439
440
441
...
433
434
435
 
 
 
436
437
438
439
440
441
442
443
444
0
@@ -433,9 +433,12 @@
0
       # We separate the two maps because most of controllers will have
0
       # the same _template_root, so it's silly to be globbing the same
0
       # path over and over.
0
- template_paths = Merb::AbstractController._abstract_subclasses.map do |klass|
0
- Object.full_const_get(klass)._template_root
0
- end.uniq.compact.map {|path| Dir["#{path}/**/*.#{extension_glob}"] }
0
+ controller_view_paths = []
0
+ Merb::AbstractController._abstract_subclasses.each do |klass|
0
+ next if (const = Object.full_const_get(klass))._template_root.blank?
0
+ controller_view_paths += const._template_roots.map { |pair| pair.first }
0
+ end
0
+ template_paths = controller_view_paths.uniq.compact.map { |path| Dir["#{path}/**/*.#{extension_glob}"] }
0
 
0
       # This gets the templates that might be created outside controllers
0
       # template roots. eg app/views/shared/*

Comments

    No one has commented yet.