@Canapin 是的!全部搞定了。这是最终的 plugin.rb 文件。原来只是我放置自定义文件路径时出了问题。
我最终把它放在了一个文件夹 /custom_views/embed/comments.html.erb 中。
# frozen_string_literal: true
# name: optuma_discourse_custom_embed
# about: A simple plugin to used to customise the template in the forum embeds
# version: 1.0.0
# authors: Optuma Pty Ltd
# url: https://github.com/OptDev/optuma-discourse-custom-embed
# required_version: 2.7.0
after_initialize do
::EmbedController.prepend_view_path File.expand_path("../custom_views", __FILE__)
end