Last active
December 17, 2015 01:29
-
-
Save kke/5528794 to your computer and use it in GitHub Desktop.
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
| <% apples = Apple.find(:all) %> # now apples = [apple1, apple2, apple3] | |
| <ul> | |
| <% apples.each do |item| %> # take apples one by one, always calling the current apple "item" | |
| <li>id: <%= item.id %></li> # item.id = id of the apple currently being processed | |
| <li>name: <%= item.name %></li> # item.name = name of the apple currently being processed | |
| <li>price: <%= item.price %></li># item.price = price of apple currently being processed | |
| <% end %> | |
| </ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment