Fix lints
This commit is contained in:
parent
9a4c0d576d
commit
41c43538b5
|
@ -1,7 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class MuteRule < ApplicationRecord
|
||||
belongs_to :user
|
||||
|
||||
validates_presence_of :muted_phrase
|
||||
validates :muted_phrase, presence: true
|
||||
|
||||
def applies_to?(post)
|
||||
!!(post.content =~ /\b#{Regexp.escape(muted_phrase)}\b/i)
|
||||
|
|
Loading…
Reference in New Issue