class method
self.action
Ruby on Rails 5.0.7.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 240
def self.action(name)
if middleware_stack.any?
middleware_stack.build(name) do |env|
req = ActionDispatch::Request.new(env)
res = make_response! req
new.dispatch(name, req, res)
end
else
lambda { |env|
req = ActionDispatch::Request.new(env)
res = make_response! req
new.dispatch(name, req, res)
}
end
end
Defined in actionpack/lib/action_controller/metal.rb line 240
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Metal