如何在 Rails 3 中设置模板处理程序*不*使用布局

发布于 2024-09-13 18:09:06 字数 215 浏览 4 评论 0原文

我有一个 Rails 3 模板处理程序,想将其配置为不使用布局。在rails2中我们会做一个

        ::ActionController::Base.exempt_from_layout :extension_name

但是这个方法在Rails 3中不再存在。我在代码中没有找到一个地方可以让模板引擎不运行布局过程。

问候

I have a rails 3 template handler and would like to configure it not to use the layout. In rails2 we would do a

        ::ActionController::Base.exempt_from_layout :extension_name

But this method does not exist in Rails 3 any more. I did not find a place within the code where there is an option for a template engine not to run through the layout procedure.

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情未る 2024-09-20 18:09:06

该选项已被弃用,然后已删除

为什么需要它?除非您创建布局模板,否则 Rails 不应呈现布局。

The option has been deprecated and then removed.

Why do you need it? Unless you create a layout template, Rails shouldn't render the layout.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文