mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-17 02:34:40 +08:00
Currently when using `register_topic_preloader_associations`, we are
not able to specify a condition that is evaluated at runtime.
This commit allows specifying a condition and also keeps backward
compatibility.
```
register_topic_preloader_associations(:linked_topic) { true }
register_topic_preloader_associations({
first_post: [uploads]
})
```
|
||
|---|---|---|
| .. | ||
| filter.rb | ||
| filter_manager.rb | ||
| instance.rb | ||
| metadata.rb | ||