您应该创建一个插件(请参阅 Plugin 中的示例存储库),以便核心升级能够正常进行。请勿“直接”修改源代码,因为这将使维护变得非常困难。请参阅 #documentation:devs 中的指南开始。如果您想获取更多数据,则需要扩展 Rails Serializers。但是,如果您的需求不多,可以考虑使用自定义字段。
merefield
(Robert)
2
相关话题
| 话题 | 回复 | 浏览量 | 活动 | |
|---|---|---|---|---|
| Is there a way to modify Discourse endpoints through plugin? | 3 | 643 | 2019 年1 月 8 日 | |
| Discourse Code Modification for personal use | 2 | 999 | 2020 年4 月 20 日 | |
| Add new API endpoints | 8 | 1345 | 2022 年3 月 23 日 | |
| How to make changes on backend side of discourse application using rails | 7 | 822 | 2022 年12 月 26 日 | |
| New columns in directory (/users) | 6 | 2728 | 2019 年10 月 16 日 |