class ActionController::Base
def self.without_modules(*modules)
easier to create a bare controller class, instead of listing the modules
This gives better control over what you want to exclude and makes it
end
end
include left
ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left|
class MyBaseController < ActionController::Metal
ActionController::Base except the ones passed as arguments:
Shortcut helper that returns all the modules included in
def self.without_modules(*modules) modules = modules.map do |m| m.is_a?(Symbol) ? ActionController.const_get(m) : m end MODULES - modules end