Permalink
Browse files

Updating view to show distance

  • Loading branch information...
1 parent c469983 commit d30cea7c5438eab68114229af24084ce643badad @pat pat committed Sep 29, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/views/contacts/index.html.erb
@@ -16,6 +16,7 @@
<% unless @contacts.empty? %>
<table>
<tr>
+ <th>Distance</th>
<th>First name</th>
<th>Last name</th>
<th>Street address</th>
@@ -25,8 +26,9 @@
<th>Postal code</th>
</tr>
- <% for contact in @contacts %>
+ <% @contacts.each_with_geodist do |contact, distance| %>
<tr>
+ <td><%= number_with_delimiter number_with_precision(distance, 0) %></td>
<td><%= h contact.first_name %></td>
<td><%= h contact.last_name %></td>
<td><%= h contact.street_address %></td>

0 comments on commit d30cea7

Please sign in to comment.