Forum: Ruby on Rails Using a search path for templates?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael S. (Guest)
on 2007-01-18 10:50
(Received via mailing list)
For several parts of my views I have generic partials. In some cases I,
however, I need to use more specific partials. Generally, I handle this
through configuration in the controllers where this applies. For this I
assign the paths of the default partials to instance variables in the
ApplicationController. When I need more specific partials, I re-assign
the instance variable with their path in a concrete controller.

This approach works, but I'd like to have it more comfy and DRYer. What
I want is a way to put the generic partials into /app/views/default and
have them used unless there are more specific partials
in /app/views/somethings.

Michael

--
Michael S.
mailto:removed_email_address@domain.invalid
http://www.schuerig.de/michael/
This topic is locked and can not be replied to.