# Help understanding view\_paths in edge rails?

**URL:** <https://www.ruby-forum.com/t/help-understanding-view-paths-in-edge-rails/108379>\
**Category:** Rails\
**Created:** [July 2, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/help-understanding-view-paths-in-edge-rails/108379 "2007-07-02T22:54:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uncle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e5b9ba/32.png) [@uncle](https://www.ruby-forum.com/u/uncle)\
**Post date:** [July 2, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/help-understanding-view-paths-in-edge-rails/108379/1 "2007-07-02T22:54:14Z")

</div>

Edge rails has something I really want/need, the ability to have a  
list of paths searched when trying to locate a view template file,  
basically they have changed the single template\_root path to an array  
called view\_paths.

Here is a link to the a modified ActionController::Base

[http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action\_controller/base.rb?rev=6120](http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/base.rb?rev=6120)

starting on line 360, they have this bit

369 @@view\_paths = {}  
370  
371 # View load paths determine the bases from which template  
references can be made. So a call to  
372 # render(“test/template”) will be looked up in the view  
load paths array and the closest match will be  
373 # returned.  
374 def view\_paths=(value)  
375 @@view\_paths[name] = value  
376 end

my question is where does the name come from on line 375 ! ie the key  
for the hash ???

Also, any advice on how to pluck out just the view\_paths stuff and add  
to my stable 1.2.3 ?

– Thanks
