Skip to content

Instantly share code, notes, and snippets.

@htanata
Created April 9, 2009 09:07
Show Gist options
  • Select an option

  • Save htanata/92339 to your computer and use it in GitHub Desktop.

Select an option

Save htanata/92339 to your computer and use it in GitHub Desktop.
module NoLayoutWhenXhr
private
def render(*args)
args[0] ||= {}
args.first[:layout] = false if request.xhr? && 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