Hi, I'm pretty new to hacking Rails internals, but I've recently
switched to edge for several reasons. One of which is the use of the
multiple controller view paths announced at
Anyway, I've developed a plugin that prepends an additional path much
as described in the article. The problem is that it is working for
layouts, but not regular templates. If I remove the regular template
from the default views directory then it does work, but when it exists
it is not being overriden correctly.
I'm working on debugging this issue and creating a patch, but I
figured someone might be able to point me more quickly in the right
direction. I have stuck debug information in a few places, so I can
verify that the following is happening:
* ActionController::Base.view_paths is being set correctly up front in
an around_filter before the action executes.
* AcionView::Base.find_base_path_for does not immediately pick up this
change even though it was made earlier in the execution. Both the
layout and the template are 'found' using the default path during the
first dozen executions of this method (while it's searching different
* When the actual render is performed (ie. after the logger output
render content/index is printed) the template is located from the
default path as well, but when it searches for layouts/application,
suddenly the full paths I specified up front are used and it finds the
I'm a little rough on the whole rendering flow, so I'm hoping someone
can point me in the right direction with a quick insight.