Module: AkismetMethods

Included in:
Spam::HamService, Spam::MarkAsSpamService, Spam::SpamVerdictService
Defined in:
app/services/concerns/akismet_methods.rb

Instance Method Summary collapse

Instance Method Details

#akismetObject


8
9
10
11
12
13
14
15
# File 'app/services/concerns/akismet_methods.rb', line 8

def akismet
  @akismet ||= Spam::AkismetService.new(
    target_owner.name,
    target_owner.email,
    target.try(:spammable_text) || target&.text,
    options
  )
end

#target_ownerObject


4
5
6
# File 'app/services/concerns/akismet_methods.rb', line 4

def target_owner
  @user ||= User.find(target.author_id)
end