mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 09:51:24 +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
|
module RateLimitable
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
def rate_limit=(value)
|
included do
|
||||||
@rate_limit = value
|
attribute :rate_limit, :boolean, default: false
|
||||||
end
|
|
||||||
|
|
||||||
def rate_limit?
|
|
||||||
@rate_limit
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def rate_limiter(by, options = {})
|
def rate_limiter(by, options = {})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user