mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Use attribute
for defining rate_limit
boolean (#35555)
This commit is contained in:
parent
5d69157e62
commit
73f72ec8fe
|
@ -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…
Reference in New Issue
Block a user