Render Devise Controllers without Layout on XHR Requests
Open your application_controller.rb and add following code:
layout :layout
private
def layout
request.xhr? && devise_controller? ? false : "application"
end
Your next ajax request will be without layout - just the template.
Written by Oliver Petznick
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#