diff options
author | Gabriel Horner <gabriel.horner@gmail.com> | 2011-03-28 23:48:17 -0400 |
---|---|---|
committer | Gabriel Horner <gabriel.horner@gmail.com> | 2011-03-28 23:48:45 -0400 |
commit | cc446d6c9f10a6258da958ecc8948ef478d9407c (patch) | |
tree | a0ae9216333a0f239f9d3da336124b377124cb1f | |
parent | 837f0ab5c8595609ec31cf885dbe04f0caa15ce0 (diff) | |
download | rails-cc446d6c9f10a6258da958ecc8948ef478d9407c.tar.gz rails-cc446d6c9f10a6258da958ecc8948ef478d9407c.tar.bz2 rails-cc446d6c9f10a6258da958ecc8948ef478d9407c.zip |
Add docs for ActionController::Metal class methods
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index e5db31061b..585bd5e5ab 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -201,19 +201,23 @@ module ActionController class_attribute :middleware_stack self.middleware_stack = ActionController::MiddlewareStack.new - def self.inherited(base) + def self.inherited(base) #nodoc: base.middleware_stack = self.middleware_stack.dup super end + # Adds given middleware class and its args to bottom of middleware_stack def self.use(*args, &block) middleware_stack.use(*args, &block) end + # Alias for middleware_stack def self.middleware middleware_stack end + # Makes the controller a rack endpoint that points to the action in + # the given env's action_dispatch.request.path_parameters key. def self.call(env) action(env['action_dispatch.request.path_parameters'][:action]).call(env) end |