You can subclass the controller and configure the router to use that:
class SessionsController < Devise::SessionsController
layout false
end
And in config/routes.rb
:
devise_for :users, :controllers => { :sessions => "sessions" }
You need to move the session views to this controller too.
OR make a method in app/controllers/application_controller.rb
:
class ApplicationController < ActionController::Base
layout :layout
private
def layout
# only turn it off for login pages:
is_a?(Devise::SessionsController) ? false : "application"
# or turn layout off for every devise controller:
devise_controller? && "application"
end
end