Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 267
Mridang Agarwalla Avatar asked Jan 27 '11 14:01

Mridang Agarwalla


1 Answers

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

like image 86
Dylan Markow Avatar answered Nov 10 '22 18:11

Dylan Markow