class method
self.middleware
Ruby on Rails edge
Since v3.0.20Signature
self.middleware()
The middleware stack used by this controller.
By default uses a variation of ActionDispatch::MiddlewareStack which allows for the following syntax:
class PostsController < ApplicationController
use AuthenticationMiddleware, except: [:index, :show]
end
Read more about [Rails middleware stack] (guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) in the guides.
Source
# File actionpack/lib/action_controller/metal.rb, line 343
def self.middleware
ActionController::MiddlewareStack::Proxy.new(self)
end
Defined in actionpack/lib/action_controller/metal.rb line 343
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Metal