discourse-ai/lib/ai_moderation
Krzysztof Kotlarek 3da4f5eac3
DEV: fix Zeitwerk issue with SpamScanner class (#1183)
When spam scanner is enabled and code is reloaded, developer experience this error:

```
NameError at /posts
===================

uninitialized constant DiscourseAi::AiModeration::EntryPoint::SpamScanner

> To access an interactive console with this error, point your browser to: /__better_errors

plugins/discourse-ai/lib/ai_moderation/entry_point.rb, line 7
```

It is because when we call `SpamScanner` it is searched within parent `DiscourseAi::AiModeration::EntryPoint` namespace.

We can help a bit Zeitwerk by calling SpamScanner more explicitly.
2025-03-11 13:24:27 +11:00
..
entry_point.rb DEV: fix Zeitwerk issue with SpamScanner class (#1183) 2025-03-11 13:24:27 +11:00
spam_metric.rb FIX: Make sure DiscoursePrometheus is installed when collecting metrics (#1107) 2025-02-03 11:04:25 -03:00
spam_report.rb FEATURE: link correctly to filters to assist in debugging spam (#1031) 2024-12-17 11:02:18 +11:00
spam_scanner.rb FIX: Check post action creator result when flagging spam (#1119) 2025-02-11 13:29:27 +10:00