mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
e50676caff
commit
942888a10c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue