[openstreetmap/openstreetmap-website] DiaryEntryController.list (#1612)

lelelelemon notifications at github.com
Tue Aug 15 16:01:21 UTC 2017


Sorry to make you confused, what I want to say is in your _location.html.erb:
<%= t 'diary_entry.location.location' %>

<a href="<%= url_for :controller => 'site', :action => 'index', :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>">
<abbr class="geo" title="<%= number_with_precision(location.latitude, :precision => 4) %>; <%= number_with_precision(location.longitude, :precision => 4) %>">
<%= describe_location location.latitude, location.longitude, 14, location.language_code %>
</abbr>
</a>

every diary, will call "describe_location location.latitude, location.longitude, 14, location.language_code" to get the real location, which is quite time consuming, why don't directly store this value into database 

-- 
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/issues/1612#issuecomment-322510363
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170815/46d7672c/attachment.html>


More information about the rails-dev mailing list