Skip to content

Instantly share code, notes, and snippets.

@vincent178
Created October 4, 2013 23:50
Show Gist options
  • Save vincent178/6834695 to your computer and use it in GitHub Desktop.
Save vincent178/6834695 to your computer and use it in GitHub Desktop.
Rails layout auto render based on xhr request
layout proc { |controller| controller.request.xhr? ? nil : 'application' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment