without_modules

without_modules(*modules)
Class Public methods

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.

doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.