Skip to content

Commit 21d0c8d

Browse files
committed
Instantiate the commentable_id
1 parent 0448e84 commit 21d0c8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/jobs/analyze_spam.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ class AnalyzeSpam < Struct.new(:spammable)
66
def perform
77
ap spammable
88

9-
thing_to_analyze = spammable['commentable_type'].constantize.find_by_id(spammable['id'])
9+
thing_to_analyze = spammable['commentable_type'].constantize.find_by_id(spammable['commentable_id'])
10+
11+
ap thing_to_analyze
1012

1113
if thing_to_analyze.spam?
1214
thing_to_analyze.create_spam_report

0 commit comments

Comments
 (0)