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