instance method rate_limiting

Ruby on Rails 7.2.3.2

Since v7.2.3.2 Private — implementation detail, not part of the public API

Available in: v7.2.3.2 v8.0.5.1 v8.1.3.1 edge

Signature

rate_limiting(to:, within:, by:, with:, store:)

No documentation comment.

Parameters

to keyreq
within keyreq
by keyreq
with keyreq
store keyreq
Source
# File actionpack/lib/action_controller/metal/rate_limiting.rb, line 53
      def rate_limiting(to:, within:, by:, with:, store:)
        count = store.increment("rate-limit:#{controller_path}:#{instance_exec(&by)}", 1, expires_in: within)
        if count && count > to
          ActiveSupport::Notifications.instrument("rate_limit.action_controller", request: request) do
            instance_exec(&with)
          end
        end
      end

Defined in actionpack/lib/action_controller/metal/rate_limiting.rb line 53 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::RateLimiting

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close