mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: Increase maximum watched word length from 50 to 100 chars (#11437)
This is useful for more complex regex watched words https://meta.discourse.org/t/166249
This commit is contained in:
@ -17,7 +17,7 @@ class WatchedWord < ActiveRecord::Base
|
||||
self.word = self.class.normalize_word(self.word)
|
||||
end
|
||||
|
||||
validates :word, presence: true, uniqueness: true, length: { maximum: 50 }
|
||||
validates :word, presence: true, uniqueness: true, length: { maximum: 100 }
|
||||
validates :action, presence: true
|
||||
validates_each :word do |record, attr, val|
|
||||
if WatchedWord.where(action: record.action).count >= MAX_WORDS_PER_ACTION
|
||||
|
Reference in New Issue
Block a user