Rails guides 上关于 layout 继承的部分是不是过时了?

andrew_qx · May 11, 2012 · Last by aNdReW_Qx replied at May 11, 2012 · 2798 hits

http://guides.rubyonrails.org/layouts_and_rendering.html#layout-inheritance

这篇上面认为 OldPostsController#show 使用 而根据最新的文档: http://api.rubyonrails.org/classes/AbstractController/Layouts/ClassMethods.html#method-i-layout

layout nil应表示默认的继承,在这里应该是 "special" 吧,到底是不是 guides 上的内容过时了?

我觉得吧,这种问题去试一下,1 分钟的事。 我没用 controller 继承,直接

layout nil

是使用了默认的 layout

#1 楼 @willmouse 我只是不确定 guides 上是不是错了... 因为还没查到有人提出 issue

You need to Sign in before reply, if you don't have an account, please Sign up first.