Skip to content

Instantly share code, notes, and snippets.

@dougo-chris
Created August 27, 2010 00:38
Show Gist options
  • Save dougo-chris/552529 to your computer and use it in GitHub Desktop.
Save dougo-chris/552529 to your computer and use it in GitHub Desktop.
<%-
start_date = @trip.start_date;
location_map = @locations.map do | location |
map = {
:start_date => format_date(start_date),
:location_id => location.id,
:position => location.position,
:title => location.title,
:nights => location.nights,
:latlng => location.latlng,
end
}
start_date += location.nights.days;
map
end
-%>
<%= location_map.to_json %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment