class method
self.without_modules
Ruby on Rails 4.0.13
Since v3.0.20Signature
self.without_modules(*modules)
Shortcut helper that returns all the modules included in ActionController::Base except the ones passed as arguments:
class MetalController 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.
Parameters
-
modulesrest
Source
# File actionpack/lib/action_controller/base.rb, line 194
def self.without_modules(*modules)
modules = modules.map do |m|
m.is_a?(Symbol) ? ActionController.const_get(m) : m
end
MODULES - modules
end
Defined in actionpack/lib/action_controller/base.rb line 194
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Base