class method
self.action
Ruby on Rails 8.1.2
Since v3.0.20Signature
self.action(name)
Returns a Rack endpoint for the given action name.
Parameters
-
namereq
Source
# File actionpack/lib/action_controller/metal.rb, line 315
def self.action(name)
app = lambda { |env|
req = ActionDispatch::Request.new(env)
res = make_response! req
new.dispatch(name, req, res)
}
if middleware_stack.any?
middleware_stack.build(name, app)
else
app
end
end
Defined in actionpack/lib/action_controller/metal.rb line 315
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Metal