[openstreetmap/openstreetmap-website] Add marker at trace start coordinate (#1731)
Tom Hughes
notifications at github.com
Sun Feb 4 15:05:38 UTC 2018
tomhughes commented on this pull request.
> @@ -16,7 +16,7 @@
<% end %>
... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
<%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_details')} %> /
- <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('trace.trace.view_map')} %> /
+ <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :mlat => "#{trace.latitude}", :mlon => "#{trace.longitude}", :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('trace.trace.view_map')} %> /
I've fixed it for this change but for future reference there's no point doing string substitution for a single value like that - it will just slow things down. Just use `:mlat => trace.latitude` etc instead.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1731#pullrequestreview-93848002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180204/c363e398/attachment.html>
More information about the rails-dev
mailing list