mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
7 lines
151 B
Ruby
7 lines
151 B
Ruby
class MuteRule < ApplicationRecord
|
|
belongs_to :user
|
|
|
|
def applies_to?(post)
|
|
!!(post.content =~ /\b#{Regexp.escape(muted_phrase)}\b/i)
|
|
end
|
|
end
|