views:

21

answers:

1

I have multiple controllers having their own views (Index.html). Now, I want to create another controller (Say "Welcome") and I want to include views of all other controllers into the view of "Welcome", so that all the views are available on single page and welcome page gets updated automatically whenever I change any individual index page of any controller.

A: 

If you whant to have view of one controller inside other controllers view you should render first view as a file <%=render 'controller/action'%> and in such case you must assign all variables that are neccessary for building this view(all variables that are assigned inside action) But you'll render this view inside your controllers layout and if you have some filters you also must apply them to the new controller

Bohdan Pohorilets