简体   繁体   中英

Can I have a page in my Ruby on Rails app that doesn't use my application.html.erb template?

I'm using application.html.erb in the views/layouts folder of my Ruby on Rails web app as a template. But there's one page in which I don't want the template to be used. Is this possible?

Sure, just do

render :layout => false

in the bottom of your action.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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