Rails Controller Hierarchy

Metal Controller in Rails

The ActionController::Base class is the great-grandfather of all Rails controllers, but doesn't get much attention. In this post, we will examine this Metal class and how it works. We'll also trace the path of an incoming HTTP request to Rails controllers.

1 min read

Update: A new version of this article is published here. You should be automatically redirected there in a few seconds. Otherwise, click the link below.

How a Ruby Method Becomes a Rails Action: Part One (Metal)
In this post, we will explore how a simple Ruby method, when added to a controller, becomes an action in Rails, ready to process incoming HTTP requests and send responses. We’ll also trace the path of an incoming HTTP request to a Rails controller action.