Hi,
When you want to change the default layout and template, you can do the
following.
render :layout => “some_controller/my_layout” :template => “my_template”
I’m in a situation where I need to change the layout and template
dynamically according to the data from DB.
I want to set them for controller-wide instead of action-wide.
(In one place instead of many places)
How can I do that?
For example,
In view/boards/one, there are show.rhtml, list.rhtml, …
In view/boards/two, there are show.rhtml, list.rhtml, …
I want to change the location of templates dynamically.
This is sort of like theme change.
Layouts have the same issue.
Thanks in advance.
Sam