Forum: Ruby on Rails help understanding view_paths in edge rails ??

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Aec10c73877ea116bab759e060b2fcb3?d=identicon&s=25 uncle (Guest)
on 2007-07-02 22:54
(Received via mailing list)
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

starting on line 360, they have this bit

369         @@view_paths = {}
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
This topic is locked and can not be replied to.