简体   繁体   English

Ruby on Rails:应用程序布局出现在弹出窗口

[英]ruby on rails: application layout appearing in popup

In my RoR application, I have a link which opens up a popup window. 在我的RoR应用程序中,我有一个链接,它会打开一个弹出窗口。 I am using a different stylesheet for the popup but the problem is that it's displaying the menubar & banner defined in the main application.html.erb. 我在弹出窗口中使用了不同的样式表,但问题是它显示的是主application.html.erb中定义的菜单栏和横幅。 I want my popup window to be simple and don't want it to contain the main banner of the menu bar and although am using a seperate stylesheet, the main menu/banner are still displayed. 我希望我的弹出窗口很简单,并且不希望它包含菜单栏的主标题,尽管我使用的是单独的样式表,但仍显示主菜单/横幅。

Can someone please shed some light on this for me. 有人可以帮我阐明一下。

Thanks a lot for your help 非常感谢你的帮助

Here's some documentation 这是一些文件

If you don't want the layout to render 如果您不想渲染布局

render :layout => false

or 要么

layout nil

Use 采用

render :layout => false

in the action that is used in the popup 在弹出窗口中使用的操作中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM