based on an online tutorial I have the following two lines in my view. rails/ujs is loaded, running rails 6.1.0 with latest version of turbo.
the button_to gives the desired behaviour, the current frame is replaced with the corresponding frame from the response.
the link_to has identical behaviour on the server side but results in the page being blanked out and only the corresponding frame to remain visible, which feels unexpected. is their some logic behind this I could try to understand?
<%= button_to "Like (#{tweet.likes})", tweet_like_path(tweet), method: :post %>
<%= link_to "Like (#{tweet.likes})", tweet_like_path(tweet), method: :post %>