Commit 490117c23b4955a337f1800e8be7eaaabe6f5e5d

Authored by Guilherme Rojas V. de Lima
Committed by Rafael Manzo
1 parent 49c1a2db

Cache to homepage projects listing

Signed off by: Rafael Reggiani Manzo <rr.manzo@gmail.com>
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
app/views/home/index.html.erb
... ... @@ -11,7 +11,9 @@
11 11 <h2>Latest projects</h2>
12 12  
13 13 <ul>
14   - <% @latest_projects.each do |project| %>
15   - <li><%= link_to(project.name, project_path(project.id)) %></li>
  14 + <% cache do %>
  15 + <% @latest_projects.each do |project| %>
  16 + <li><%= link_to(project.name, project_path(project.id)) %></li>
  17 + <% end %>
16 18 <% end %>
17 19 </ul>
... ...