To directly answer your question ActionController
is not a controller class, it's a namespacing module that powers the entire controller stack. You would not interact with the ActionController
module during typical Rails development. ActionController::Base
is actually the class that controllers inherit from. This is why you can't inherit from ActionController
.
But I think there are two controllers in play here. ActionController::Base
and ApplicationController
. I think you might be mistaking ApplicationController
for being ActionController
without the ::Base
.
ActionController::Base
is the main controller class where all of your Rails functionality comes from. ApplicationController
is a generalized controller that you can add methods to and have all of your other Rails controllers inherit from.
You could do the following to use a different layout in one of your controllers:
class AuthenticationController < ApplicationController
layout 'authentication'
end
You can either use the AuthenticationController
directly, or have new controllers inherit from AuthenticationController
.