Using a different to_partial_path when rendering Action Text

I’ve added custom attachments to Action Text following this tutorial by Chris Oliver: RailsConf 2020

I now have Basecamp-style @mentions in my action texts.

The issue I’m running into is that Action Text calls to_partial_path on the user model when rendering these embedded action texts. However, I want these @mentions to be rendered differently from other parts of my site where I call render @user (which also calls to_partial_path).

I find it surprising that Action Text assumes people want to render their models the same way in these different instances. Is there a way to have Action Text use a different partial when rendering its HTML?

Note that I’m not talking about rendering the attachment within the Trix editor. Because that’s indeed already possible through to_trix_content_attachment_partial_path

I’m also aware I could simply change my existing render calls (render @user, etc) to use a specific partial. But that seems backwards.

Found this relevant discussion: ActionText does not support Trix content attachments · Issue #35218 · rails/rails · GitHub

Seems like having a custom partial path is currently not supported.