mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
factor out @post.revise into its own class. clean up PostRevisor class to be more readable
This commit is contained in:
parent
f44dba5fc5
commit
701ecddac2
5 changed files with 263 additions and 74 deletions
6
lib/edit_rate_limiter.rb
Normal file
6
lib/edit_rate_limiter.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require 'rate_limiter'
|
||||
class EditRateLimiter < RateLimiter
|
||||
def initialize(user)
|
||||
super(user, "edit-post:#{Date.today.to_s}", SiteSetting.max_edits_per_day, 1.day.to_i)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue