Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Move athletes table to partial #10

Merged
merged 1 commit into from

2 participants

Dave Kroondyk Mike Munroe
Dave Kroondyk

We don't want update this table in two spots every time.

Mike Munroe mikepmunroe merged commit be5d0fd into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2013
  1. move athletes table to partial

    Dave Kroondyk authored
This page is out of date. Refresh to see the latest.
32 app/views/shared/_athletes.html.erb
View
@@ -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>
+
32 app/views/southie/index.html.erb
View
@@ -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 %>
32 app/views/wicked/index.html.erb
View
@@ -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 %>
Something went wrong with that request. Please try again.