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

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.

Show source
Register or log in to add new notes.
April 9, 2014 - (>= v4.0.2)
0 thanks

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.