Skip to content

Instantly share code, notes, and snippets.

@queso
Created June 1, 2010 02:03
Show Gist options
  • Save queso/420477 to your computer and use it in GitHub Desktop.
Save queso/420477 to your computer and use it in GitHub Desktop.
<h1>Listing businesses</h1>
<%= add_map("map_div", @businesses, {:labels => true}) %>
<div id="map_div" style="width: 600px; height: 400px;"></div>
<table>
<tr>
<th>Address</th>
<th>Latitude</th>
<th>Longitude</th>
</tr>
<% @businesses.each do |business| %>
<tr>
<td><%=h business.address %></td>
<td><%=h business.latitude %></td>
<td><%=h business.longitude %></td>
<td><%= link_to 'Show', business %></td>
<td><%= link_to 'Edit', edit_business_path(business) %></td>
<td><%= link_to 'Destroy', business, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New business', new_business_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment