Forum: Ruby on Rails Newbie multiple controllers/layouts question

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.
Larry B. (Guest)
on 2005-12-30 23:52
(Received via mailing list)
Hi all,

I'm playing around with Dave T.' depot project, trying to add site
search, starting with code from the search_generator gem. I got basic
search working. Now I'm trying to understand how to integrate the search
result pages more fully into the overall application and I'm having
architectural "issues". search_generator creates its own MVC hierarchy
in the application, with it's own layout,etc. The problem is that the
depot project has two personalities (admin and store), each with their
own look and feel. So I need a little insight:

First of all, should I continue with a search controller with its own
views and try to selectively hook into the admin/store layouts, or
should I be somehow invoking the search functionality from within the
admin/store controllers and rendering from their views? My desire is for
the search results page to look just like the regular listing (of
whatever), except showing only the resulting items.

Second, if the first approach is ok, given controllers a, b, and c, how
do I get controller c to selectively use the layouts of a or b depending
on some session parameter?

Larry B.
This topic is locked and can not be replied to.