mirror of
https://github.com/discourse/discourse.git
synced 2025-06-15 18:51:37 +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] }) ```