class method
self.action
Ruby on Rails 4.0.13
Since v3.0.20Signature
self.action(name, klass = ActionDispatch::Request)
Returns a Rack endpoint for the given action name.
Parameters
-
namereq -
klassopt = ActionDispatch::Request
Source
# File actionpack/lib/action_controller/metal.rb, line 229
def self.action(name, klass = ActionDispatch::Request)
middleware_stack.build(name.to_s) do |env|
new.dispatch(name, klass.new(env))
end
end
Defined in actionpack/lib/action_controller/metal.rb line 229
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Metal