Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #10 from davekaro/master

Move athletes table to partial
  • Loading branch information...
commit be5d0fd7e4573815ea220ac4031127a1ae9e6fea 2 parents 8ad127b + 321bea6
@mikepmunroe authored
View
32 app/views/shared/_athletes.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>
+
View
32 app/views/southie/index.html.erb
@@ -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 %>
View
32 app/views/wicked/index.html.erb
@@ -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 %>
Please sign in to comment.
Something went wrong with that request. Please try again.