Last active
April 1, 2022 15:04
-
-
Save starwels/0294c7471bd4a2d209c64ffc24699b99 to your computer and use it in GitHub Desktop.
This file contains 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
<div> | |
posts: <%= @posts.count %> <br> | |
<% @posts.each do |post| %> | |
<%= post.title %> | |
<hr> | |
<%= post.body %> | |
<% if post.created_at < post.updated_at %> | |
(edited) | |
<% else %> | |
(first version) | |
<% end %> | |
<hr> | |
comments: <%= post.comments.count %> <br> | |
<% post.comments.each do |comment| %> | |
<%= comment.body %> | |
<% end %> | |
<hr> | |
<% end %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment