Return a rack endpoint for the given action. Memoize the
endpoint, so multiple calls into MyController.action will return the same
object for the same action.
# File actionpack/lib/action_controller/metal.rb, line 244
def self.action(name, klass = ActionDispatch::Request)
middleware_stack.build(name.to_s) do |env|
new.dispatch(name, klass.new(env))
end
end