Skip to content

Instantly share code, notes, and snippets.

@aspencer8111
Last active February 6, 2019 16:41
Show Gist options
  • Save aspencer8111/e7345bf4a826d5a2416d6591a8e492fa to your computer and use it in GitHub Desktop.
Save aspencer8111/e7345bf4a826d5a2416d6591a8e492fa to your computer and use it in GitHub Desktop.
2. This is a new PR, please review and give feedback
<!-- assume that there is a posts controller with an index method that looks like this:
def index
@posts = Post.all
end
-->
<ul>
<% @posts.each do |post| %>
<li>
<%= post.body %>
<ul>
<% post.comments.each do |comment| %>
<li><%= comment.body %></li>
<% end %>
</ul>
</li>
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment