mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
40ce619edd
When validating with a dynamic set of values, especially one that might change during runtime, we should use a lambda or a proc to ensure that the validation uses the most up-to-date set of values. This is particularly important when using config.eager_load = true, which can cause some elements to be loaded only once at startup, thus not reflecting changes made at runtime. This was the root cause of the issues here, as we were adding more ReviewableScore types after initial load through: `register_reviewable_type Chat::ReviewableMessage` |
||
---|---|---|
.. | ||
controllers/chat | ||
helpers/chat | ||
jobs | ||
models | ||
policies | ||
queries/chat | ||
serializers/chat | ||
services | ||
validators/chat | ||
views |