开发者

How can I make Rails exclude application.erb when rendering the layout?

开发者 https://www.devze.com 2023-02-07 05:41 出处:网络
I\'m making an AAJX request to an action in a controller. I fetch the rendered HTML and display it in a tag in the current page. The开发者_运维技巧 view that I\'m POSTing to, renders the layout with t

I'm making an AAJX request to an action in a controller. I fetch the rendered HTML and display it in a tag in the current page. The开发者_运维技巧 view that I'm POSTing to, renders the layout with the default application.erb. I would like rails to use the default layout for the controller/action but not render the main application.erb. How do I do this?


You can tell render not to use your application's layout using render :layout => false

0

精彩评论

暂无评论...
验证码 换一张
取 消