Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created August 27, 2008 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiew/7383 to your computer and use it in GitHub Desktop.
Save jamiew/7383 to your computer and use it in GitHub Desktop.
# never render the full layout if it's an XmlHttpRequest
class ApplicationController < ActionController::Base
def render(*args)
args.first[:layout] = false if request.xhr? and args.first[:layout].nil?
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment