Soc/app/views/microposts/_micropost.html.erb

16 lines
517 B
Plaintext
Raw Normal View History

<div class="micropost">
<%= micropost.content %>
2023-10-19 18:10:20 +00:00
<% unless micropost.tags.empty? %>
<h5>Tags:</h5>
<ul id="micropost-<%= micropost.id %>-tags" class="micropost-tags">
<% micropost.tags.each do |tag| %>
2023-10-19 18:56:39 +00:00
<li><%= link_to tag.name, tag %></li>
2023-10-19 18:10:20 +00:00
<% end %>
</ul>
<% end %>
<div class="created_at">
2023-10-05 18:05:53 +00:00
<%= link_to "Edit", edit_micropost_path(micropost) if micropost.user == current_user %>
<%= link_to micropost.created_at.strftime("%Y-%m-%d %H:%M"), micropost %>
</div>
</div>