It took me a few minutes to figure this out so I thought I would post a quick note on this.  I had a situation where I wanted to render form for a new resource that was being managed by resource_controller. In this specific case I wanted to disable the layout but only for the new action (I wanted to leave my headers, etc. intact for the index action, etc.)  I was able to accomplish this easily enough by adding the following to my controller:

new_action.response do |wants|
  wants.html {render :action => :new, :layout => false}
end
blog comments powered by Disqus