Created
February 27, 2014 16:54
-
-
Save mikecmpbll/9254169 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
def show | |
@purchase = Purchase.find(params[:id]) | |
end |
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
<ul> | |
<% @purchase.purchase_items.includes(:item).each do |pi| %> | |
<li>Item name: <%= pi.item.name %></li> | |
<li>Quantity purchased: <%= pi.quantity %></li> | |
<% end %> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment