Now that controllers can have multiple view paths I’ve been playing with
themes over the weekend. Running into a view issues. I have a
before_filter in the ApplicationController that calls prepend_view_path
to add the path of my theme. I even log the view_paths in an
after_filter to make sure it made it all the way through. The output
looks something like:
Yet nothing loads. In the docs it says calling prepend_view_path as an
instance method will only effect the current request, which I figured
should be fine. But I tried calling it as a class method as well, which
is supposed to not effect the current request, but all future requests.
Even this isn’t working as expected. Only way I’ve managed to get it to
work is if I don’t ever clean it up. So I keep prepending over and
over, making the path ridiculously long and redundant.
I even installed the darwinweb.net multisite plugin. Same issues. Only
way I could get it to work is if I removed the code that cleaned up
after itself, so the path got out of control.
Right now I’m running this with webrick locally on Leopard 10.5. Is
this just a Leopard bug or am I maybe doing something wrong?
Here is what’s in my before_filter:
prepend_view_path(RAILS_ROOT + ‘/themes/default/views’)
When printed to the log, the paths look great. Any suggestions?