mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
The original motivation for this change was to avoid mutating imported modules (by stubbing imported functions in tests) Other than that it's a good practice to place code like this in services, especially (although not the case here) if it requires access to other services or controller.