Last active
February 6, 2019 16:41
-
-
Save aspencer8111/e7345bf4a826d5a2416d6591a8e492fa to your computer and use it in GitHub Desktop.
2. This is a new PR, please review and give feedback
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
<!-- 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