mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
parent
e50676caff
commit
942888a10c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user