Use `attribute` for defining `rate_limit` boolean (#35555)

pull/35558/head
Matt Jankowski 4 months ago committed by GitHub
parent 5d69157e62
commit 73f72ec8fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 = {})

Loading…
Cancel
Save