如何打印视图中当前布局的名称?
Example
puts controller.current_layout
Thx
这适用于 Rails 3.0.7:
controller.send :_layout
显然,这是一种私有方法,因此使用时需要您自担风险。