I want to be able to change dynamically the view folder. The aim is to be able to change completely the web design depending on the request. I am thinking about something like this :
Class PagesController
default_views_path(current_theme_path)
def show
Blablah...
end
end
Supposing a directory architecture like this :
-apps
--views
---theme 1/show.html.erb
---theme 2/show.html.erb
---theme 3/show.html.erb
I search over the web and I have found preprend_view_path
. (:deprecated) Do you think this is a good idea ot use this ? Any feedback ?
EDIT
In fact, I want to simplify this :
Class PagesController
def show
render "#{current_theme}/show"
end
def edit
render "#{current_theme}/edit"
end
def list
render "#{current_theme}/list"
end
def index
render "#{current_theme}/index"
end
end
Any Solutions ?