소스 검색

Iteration C5.

master
Nils Dittberner 9 년 전
부모
커밋
792a8a2a57
1개의 변경된 파일13개의 추가작업 그리고 9개의 파일을 삭제
  1. +13
    -9
      app/views/store/index.html.erb

+ 13
- 9
app/views/store/index.html.erb 파일 보기

@@ -2,13 +2,17 @@

<h1>Your Pragmatic Catalog</h1>

<% @products.each do |product| %>
<div class="entry">
<%= image_tag(product.image_url) %>
<h3><%= product.title %></h3>
<%= sanitize(product.description) %>
<div class="price_line">
<span class="price"><%= number_to_currency(product.price) %></span>
</div>
</div>
<% cache @products do %>
<% @products.each do |product| %>
<% cache product do %>
<div class="entry">
<%= image_tag(product.image_url) %>
<h3><%= product.title %></h3>
<%= sanitize(product.description) %>
<div class="price_line">
<span class="price"><%= number_to_currency(product.price) %></span>
</div>
</div>
<% end %>
<% end %>
<% end %>

불러오는 중...
취소
저장