Rails布局继承文档错误



在rails 3.2发行说明页面上(http://guides.rubyonrails.org/3_2_release_notes.html),上面写着:

Deprecated implied layout lookup in controllers whose parent had a explicit layout set

但我在rails 3.2.6应用程序中尝试了以下操作:

class ApplicationController < ActionController::Base
  protect_from_forgery
  layout "application_main"
end
class HomeController < ApplicationController
  def index
    @slideshow_pics = Event.get_intro_slide_photos
  end
end

定义了布局application_main.html.hamlhome.html.haml,当我转到主页#索引页面时,我得到的是home.html.haml布局,而不是其他布局。

这似乎与贬低背道而驰,所以我想知道,3.2.6之后的一个版本是否回归了贬低?

要比Dave更清楚地说,"弃用"意味着:小心,我们将来会删除此功能!我们发出这个警告,所以你要注意,最好在我们改变工作方式后尽快改变

这并不意味着功能已经改变。

最新更新