/ Published in: Ruby

This allows you to turn off ajax requests application wide, so that you don't have to do render :layout => false in every controller that needs it.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
layout proc{ |c| c.request.xhr? ? false : "application" }
URL: http://artofmission.com/articles/2006/12/20/turn-off-rails-layouts-for-ajax-requests
Comments
