method
without_modules
v5.2.3 -
Show latest stable
- Class:
ActionController::Base
without_modules(*modules)public
Shortcut helper that returns all the modules included in ActionController::Base except the ones passed as arguments:
class MyBaseController < ActionController::Metal ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| include left end end
This gives better control over what you want to exclude and makes it easier to create a bare controller class, instead of listing the modules required manually.
1Note
Requires inheritance of ActionController::Metal
The example code will not work unless class inherits from ActionController::Metal (to get functioning controller) or at least AbstractController:Base.