Created
February 26, 2021 05:10
-
-
Save catmando/13ed081255728ba766c824703249b656 to your computer and use it in GitHub Desktop.
Hyperstack vs Hotwire _tweet.html.erb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= turbo_frame_tag dom_id(tweet) do %> | |
<div class="card card-body"> | |
<div><%= tweet.body %></div> | |
<div class="mt-2"> | |
<%= button_to "Likes (#{tweet.likes_count})", tweet_like_path(tweet), method: :post %> | |
<%= button_to "Retweets (#{tweet.retweets_count})", tweet_retweet_path(tweet), method: :post %> | |
<%= link_to "Edit", edit_tweet_path(tweet) %> | |
</div> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment