mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 04:26:03 +01:00
Fix lints
This commit is contained in:
parent
9a4c0d576d
commit
41c43538b5
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue