November 2008
1 post
5 tags
Rails: How to change the views folder
class ActionController::Base
def self.inherited(klass)
klass.append_view_path(File.join(File.dirname(__FILE__),'app','views'))
super
end
end
you could place something like:
def set_default_views_folder self.append_view_path(File.join(RAILS_ROOT, 'app', 'views', 'YOU SPECIAL FOLDER') end
to your ApplicationController, then on every request you can append an otherĀ search path to the...