READ THE REAL CODE

From the source.

Reviewed excerpts from Ruby on Rails. Every passage is pinned to a specific revision.

RUBY ON RAILS / MIT

Action Controller: rate_limit

David Heinemeier Hansson

Original implementation from 2024. Excerpt with outer indentation removed; not a current Rails setup guide.

View original source ↗

RUBY ON RAILS / MIT

Rails: protect a session

David Heinemeier Hansson

Documentation example from the original rate-limiting change. Comment prefixes removed.

View original source ↗

RUBY ON RAILS / MIT

Rails: StringInquirer

Rails contributors

Class excerpt with outer indentation removed. This revision includes contributions by multiple authors.

View original source ↗

RUBY ON RAILS / MIT

Rails: request limiter

David Heinemeier Hansson

Complete method from the original 2024 implementation, with outer indentation removed. Counts requests and handles callers that exceed the limit; not a current Rails setup guide.

View original source ↗

Rails excerpts are used under the Rails MIT license. Attribution describes the source of the code, not sponsorship or endorsement of Typearchy.