Permalink
Browse files

Merge pull request #10 from davekaro/master

Move athletes table to partial
  • Loading branch information...
2 parents 8ad127b + 321bea6 commit be5d0fd7e4573815ea220ac4031127a1ae9e6fea @mikepmunroe committed Mar 20, 2013
Showing with 34 additions and 62 deletions.
  1. +32 −0 app/views/shared/_athletes.html.erb
  2. +1 −31 app/views/southie/index.html.erb
  3. +1 −31 app/views/wicked/index.html.erb
@@ -0,0 +1,32 @@
+<h1>Athletes</h1>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Affiliate</th>
+ <th>Age</th>
+ <th>13.1</th>
+ <th>13.2</th>
+ <th>13.3</th>
+ <th>13.4</th>
+ <th>13.5</th>
+ <th>Total</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% athletes.each do |athlete| %>
+ <tr>
+ <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
+ <td><%= athlete.affiliate %></td>
+ <td><%= athlete.age %></td>
+ <td><%= athlete.w1 %></td>
+ <td><%= athlete.w2 %></td>
+ <td><%= athlete.w3 %></td>
+ <td><%= athlete.w4 %></td>
+ <td><%= athlete.w5 %></td>
+ <td><%= athlete.total %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
@@ -1,32 +1,2 @@
-<h1>Athletes</h1>
-<table class="table table-striped">
- <thead>
- <tr>
- <th>Name</th>
- <th>Affiliate</th>
- <th>Age</th>
- <th>13.1</th>
- <th>13.2</th>
- <th>13.3</th>
- <th>13.4</th>
- <th>13.5</th>
- <th>Total</th>
- </tr>
- </thead>
- <tbody>
- <% @athletes.each do |athlete| %>
- <tr>
- <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
- <td><%= athlete.affiliate %></td>
- <td><%= athlete.age %></td>
- <td><%= athlete.w1 %></td>
- <td><%= athlete.w2 %></td>
- <td><%= athlete.w3 %></td>
- <td><%= athlete.w4 %></td>
- <td><%= athlete.w5 %></td>
- <td><%= athlete.total %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
+<%= render :partial => 'shared/athletes', :object => @athletes %>
@@ -1,32 +1,2 @@
-<h1>Athletes</h1>
-<table class="table table-striped">
- <thead>
- <tr>
- <th>Name</th>
- <th>Affiliate</th>
- <th>Age</th>
- <th>13.1</th>
- <th>13.2</th>
- <th>13.3</th>
- <th>13.4</th>
- <th>13.5</th>
- <th>Total</th>
- </tr>
- </thead>
- <tbody>
- <% @athletes.each do |athlete| %>
- <tr>
- <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
- <td><%= athlete.affiliate %></td>
- <td><%= athlete.age %></td>
- <td><%= athlete.w1 %></td>
- <td><%= athlete.w2 %></td>
- <td><%= athlete.w3 %></td>
- <td><%= athlete.w4 %></td>
- <td><%= athlete.w5 %></td>
- <td><%= athlete.total %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
+<%= render :partial => 'shared/athletes', :object => @athletes %>

0 comments on commit be5d0fd

Please sign in to comment.