我想在我的Rails应用程序中为一个特定的动作设置不同的布局.我怎么做?
解决方法
layout :resolve_layout . . . private def resolve_layout case action_name when "new" "alternate" else "application" end end
layout :resolve_layout . . . private def resolve_layout case action_name when "new" "alternate" else "application" end end