开发者

rails 3 - additional views in a different directory

I am look at upgrading our legacy rails 2 app to rails 3. One thing is that we have an 开发者_运维问答additional set of view files in a different directory. In rails 2 I had an initializer that did this:

ActionController::Base.view_paths.unshift File.join("#{RAILS_ROOT}/app/renderers", 'views')

How can I do a similar thing in rails 3?


Here's how you'd do it now:

SampleApplication::Application.config.paths.app.views << File.join( Rails.root, 'app', 'complementary_views' )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜