1

当我contact_us在 Rails 应用程序中使用 gem 时,它使用应用程序的布局。但我想为联系我们页面使用另一种布局。我怎样才能做到这一点?

4

1 回答 1

1

这是您可以在相应的控制器中执行的操作,您可以从特定的操作中指定备用布局模板。

# controller that calls the page
def action
  render :layout => 'other'
end
于 2017-07-18T10:33:01.970 回答