Skip to content

Instantly share code, notes, and snippets.

@kirillshevch
Created February 3, 2017 13:48
Show Gist options
  • Save kirillshevch/c3e23d68ddfba287a7a07616ee82a9e9 to your computer and use it in GitHub Desktop.
Save kirillshevch/c3e23d68ddfba287a7a07616ee82a9e9 to your computer and use it in GitHub Desktop.
<% Order.all.each do |o| %>
<%= o.buyer.name %> bought <%= o.product.name %>
<% end %>
<% cache do %>
All available products:
<% Product.all.each do |p| %>
<%= link_to p.name, product_url(p) %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment