fmartinez PRO said 8 months ago :
For the 1 and 2, just didn't work due needed the information from the logged in user
Seems to me that turbo streams create the partial to be pasted in the target without any interaction, only the model create the partial with db info
So, no way to get current_user

The only way that worked for me was number 3
Initially I wanted to trigger a stimulus action on turbo load, but, it wasn't enough. 
I think this will require some morph... too much work for a personal project

End up selecting path number 3
Added current user on the DOM
<div hidden id="session_set"><%=></div>

Then, on the partial, added plain javascript code
I just wanted to align according current user, so, I added this on the partial
        if(document.getElementById("session_set").innerHTML == <%= %>) {
            let msgPartial = <%="message_#{dom_id message}"%>;

            let msgPartialContainer = <%="message_#{dom_id message}_container"%>;

            let msgPartialUsertag = <%="message_#{dom_id message}_usertag"%>;


Spend sooooo much time on it that didn't care to go all 90's on it

Im okay with it due its only for presentation purpose
Anyhow for edit or delete action could create a static turbo_stream_from with information of the user that match (is the approach of this video Anyhow, due it is static, the approach didn't work for me

Well, this is my learning Hotwire experience repo