2
0

Use attribute for defining rate_limit boolean (#35555)

This commit is contained in:
Matt Jankowski
2025-07-28 04:08:31 -04:00
committed by GitHub
parent 5d69157e62
commit 73f72ec8fe

View File

@@ -3,12 +3,8 @@
module RateLimitable
extend ActiveSupport::Concern
def rate_limit=(value)
@rate_limit = value
end
def rate_limit?
@rate_limit
included do
attribute :rate_limit, :boolean, default: false
end
def rate_limiter(by, options = {})