Reputation: 1310
I have two layouts for my application, and I need to use a group of views for one of those templates (for same controller actions)
I don’t want to touch each action on the controllers specifying the view to use with render.
My views looks like:
* /Views/controller_abc/new.erb
* /Views/alternative_template/controller_abc/new.erb
Upvotes: 1
Views: 20
Reputation: 7708
You can use prepend_view_path, in your ApplicationController
before_filter :set_view_path
def set_view_path
prepend_view_path "#{Rails.root}/app/views/alternative_template"
end
Upvotes: 1